summaryrefslogtreecommitdiff
path: root/lib/ckfw
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2015-08-17 11:22:29 -0700
committerMartin Thomson <martin.thomson@gmail.com>2015-08-17 11:22:29 -0700
commitedfddd7b86ae3cc6b1b2440216d4b83cdd9f321b (patch)
tree243150dab7af42c35c08dd056ee854bad24a1bdd /lib/ckfw
parent03d2e2d3d9d618778194c3759dee4bc625310f55 (diff)
downloadnss-hg-edfddd7b86ae3cc6b1b2440216d4b83cdd9f321b.tar.gz
Bug 1182667 - Enable warnings as errors, r=rrelyea
Diffstat (limited to 'lib/ckfw')
-rw-r--r--lib/ckfw/builtins/binst.c6
-rw-r--r--lib/ckfw/builtins/certdata.perl1
-rw-r--r--lib/ckfw/hash.c4
-rw-r--r--lib/ckfw/token.c3
4 files changed, 4 insertions, 10 deletions
diff --git a/lib/ckfw/builtins/binst.c b/lib/ckfw/builtins/binst.c
index 8940ea035..8cb057d96 100644
--- a/lib/ckfw/builtins/binst.c
+++ b/lib/ckfw/builtins/binst.c
@@ -65,10 +65,8 @@ builtins_mdInstance_GetLibraryVersion
NSSCKFWInstance *fwInstance
)
{
- extern const char __nss_builtins_version[];
- volatile char c; /* force a reference that won't get optimized away */
-
- c = __nss_builtins_version[0];
+#define NSS_VERSION_VARIABLE __nss_builtins_version
+#include "verref.h"
return nss_builtins_LibraryVersion;
}
diff --git a/lib/ckfw/builtins/certdata.perl b/lib/ckfw/builtins/certdata.perl
index 56771f5cb..e77decf9f 100644
--- a/lib/ckfw/builtins/certdata.perl
+++ b/lib/ckfw/builtins/certdata.perl
@@ -11,7 +11,6 @@ my $o;
my @objects = ();
my @objsize;
-$constants{CKO_DATA} = "static const CK_OBJECT_CLASS cko_data = CKO_DATA;\n";
$constants{CK_TRUE} = "static const CK_BBOOL ck_true = CK_TRUE;\n";
$constants{CK_FALSE} = "static const CK_BBOOL ck_false = CK_FALSE;\n";
diff --git a/lib/ckfw/hash.c b/lib/ckfw/hash.c
index 51f53b1a9..e4f6ce2bd 100644
--- a/lib/ckfw/hash.c
+++ b/lib/ckfw/hash.c
@@ -48,9 +48,7 @@ nss_ckfw_identity_hash
const void *key
)
{
- PRUint32 i = (PRUint32)key;
- PR_ASSERT(sizeof(PLHashNumber) == sizeof(PRUint32));
- return (PLHashNumber)i;
+ return (PLHashNumber)((char *)key - (char *)NULL);
}
/*
diff --git a/lib/ckfw/token.c b/lib/ckfw/token.c
index aaaf11888..4a9757643 100644
--- a/lib/ckfw/token.c
+++ b/lib/ckfw/token.c
@@ -1258,7 +1258,7 @@ nssCKFWToken_GetUTCTime
{
/* Format is YYYYMMDDhhmmss00 */
int i;
- int Y, M, D, h, m, s, z;
+ int Y, M, D, h, m, s;
static int dims[] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
for( i = 0; i < 16; i++ ) {
@@ -1274,7 +1274,6 @@ nssCKFWToken_GetUTCTime
h = ((utcTime[ 8] - '0') * 10) + (utcTime[ 9] - '0');
m = ((utcTime[10] - '0') * 10) + (utcTime[11] - '0');
s = ((utcTime[12] - '0') * 10) + (utcTime[13] - '0');
- z = ((utcTime[14] - '0') * 10) + (utcTime[15] - '0');
if( (Y < 1990) || (Y > 3000) ) goto badtime; /* Y3K problem. heh heh heh */
if( (M < 1) || (M > 12) ) goto badtime;