summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-03-15 06:07:41 +0000
committerwtc%netscape.com <devnull@localhost>2002-03-15 06:07:41 +0000
commit25a4385539307e737544d95ea23a3d95e43b28de (patch)
tree8f4b5b2122fac556bd8f07846abae5f43992899d
parent9b5fe9c1797dd1eca032f10ca0e571c97b2fca19 (diff)
downloadnss-hg-25a4385539307e737544d95ea23a3d95e43b28de.tar.gz
Bugzilla bug 131078: fixed compiler warnings. r=mcgreer.
-rw-r--r--security/coreconf/nsinstall/nsinstall.c2
-rw-r--r--security/nss/cmd/certutil/certutil.c4
-rw-r--r--security/nss/cmd/crlutil/crlutil.c2
-rw-r--r--security/nss/cmd/lib/secutil.c4
-rw-r--r--security/nss/cmd/makepqg/makepqg.c2
-rw-r--r--security/nss/cmd/modutil/modutil.h2
-rw-r--r--security/nss/cmd/modutil/pk11.c1
-rw-r--r--security/nss/cmd/signver/pk7print.c4
-rw-r--r--security/nss/cmd/smimetools/cmsutil.c6
-rw-r--r--security/nss/cmd/ssltap/ssltap.c3
-rw-r--r--security/nss/cmd/swfort/instinit/instinit.c5
-rw-r--r--security/nss/cmd/swfort/newuser/newuser.c3
-rw-r--r--security/nss/lib/base/arena.c2
13 files changed, 24 insertions, 16 deletions
diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c
index f1d52cac4..0c9915926 100644
--- a/security/coreconf/nsinstall/nsinstall.c
+++ b/security/coreconf/nsinstall/nsinstall.c
@@ -106,7 +106,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n"
" %*s [-DdltR] file [file ...] directory\n",
- program, strlen(program), "");
+ program, (int)strlen(program), "");
exit(2);
}
diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c
index d876a9207..3238b141d 100644
--- a/security/nss/cmd/certutil/certutil.c
+++ b/security/nss/cmd/certutil/certutil.c
@@ -1119,7 +1119,7 @@ Usage(char *progName)
FPS "\t%s -R -s subj -o cert-request-file [-d certdir] [-P dbprefix] [-p phone] [-a]\n"
"\t\t [-k key-type] [-h token-name] [-f pwfile] [-g key-size]\n",
progName);
- FPS "\t%s -V -n cert-name -u usage [-b time] [-e] \n",
+ FPS "\t%s -V -n cert-name -u usage [-b time] [-e] \n"
"\t\t[-X] [-d certdir] [-P dbprefix]\n",
progName);
FPS "\t%s -S -n cert-name -s subj [-c issuer-name | -x] -t trustargs\n"
@@ -1301,7 +1301,7 @@ static void LongUsage(char *progName)
" -d certdir");
FPS "%-20s Cert & Key database prefix\n",
" -P dbprefix");
- FPS "%-20s Token to reset (default is internal)\n"
+ FPS "%-20s Token to reset (default is internal)\n",
" -h token-name");
FPS "\n");
diff --git a/security/nss/cmd/crlutil/crlutil.c b/security/nss/cmd/crlutil/crlutil.c
index 7dcc3b3a2..5ccddf446 100644
--- a/security/nss/cmd/crlutil/crlutil.c
+++ b/security/nss/cmd/crlutil/crlutil.c
@@ -126,7 +126,7 @@ static void ListCRLNames (CERTCertDBHandle *certHandle, int crlType)
while (crlNode) {
name = &crlNode->crl->crl.name;
if (!name){
- fprintf(stderr, "%s: fail to get the CRL issuer name\n", progName,
+ fprintf(stderr, "%s: fail to get the CRL issuer name (%s)\n", progName,
SECU_Strerror(PORT_GetError()));
break;
}
diff --git a/security/nss/cmd/lib/secutil.c b/security/nss/cmd/lib/secutil.c
index 186f32b8b..f7cfb8d59 100644
--- a/security/nss/cmd/lib/secutil.c
+++ b/security/nss/cmd/lib/secutil.c
@@ -984,7 +984,7 @@ secu_PrintContextSpecific(FILE *out, SECItem *i, char *m, int level)
SECU_PrintAsHex(out, &tmp, m, level+1);
}
-static
+static void
secu_PrintUniversal(FILE *out, SECItem *i, char *m, int level)
{
switch (i->data[0] & SEC_ASN1_TAGNUM_MASK) {
@@ -1056,7 +1056,7 @@ secu_PrintValidity(FILE *out, CERTValidity *v, char *m, int level)
void
SECU_PrintObjectID(FILE *out, SECItem *oid, char *m, int level)
{
- char *name;
+ const char *name;
SECOidData *oiddata;
oiddata = SECOID_FindOID(oid);
diff --git a/security/nss/cmd/makepqg/makepqg.c b/security/nss/cmd/makepqg/makepqg.c
index 9a9e79106..028ef7259 100644
--- a/security/nss/cmd/makepqg/makepqg.c
+++ b/security/nss/cmd/makepqg/makepqg.c
@@ -35,9 +35,11 @@
#include "prtime.h"
#include "prlong.h"
+#include "nss.h"
#include "secutil.h"
#include "secitem.h"
#include "pk11func.h"
+#include "pk11pqg.h"
#include "pqgutil.h"
#include "secrng.h"
diff --git a/security/nss/cmd/modutil/modutil.h b/security/nss/cmd/modutil/modutil.h
index 89b8a204a..83f74ffcf 100644
--- a/security/nss/cmd/modutil/modutil.h
+++ b/security/nss/cmd/modutil/modutil.h
@@ -57,6 +57,8 @@ Error ListModule(char *moduleName);
Error ListModules();
Error ChangePW(char *tokenName, char *pwFile, char *newpwFile);
Error EnableModule(char *moduleName, char *slotName, PRBool enable);
+Error RawAddModule(char *dbmodulespec, char *modulespec);
+Error RawListModule(char *modulespec);
Error SetDefaultModule(char *moduleName, char *slotName, char *mechanisms);
Error UnsetDefaultModule(char *moduleName, char *slotName, char *mechanisms);
void out_of_memory(void);
diff --git a/security/nss/cmd/modutil/pk11.c b/security/nss/cmd/modutil/pk11.c
index 07c4d44a5..b0c4cd487 100644
--- a/security/nss/cmd/modutil/pk11.c
+++ b/security/nss/cmd/modutil/pk11.c
@@ -316,6 +316,7 @@ RawListModule(char *modulespec)
return SUCCESS;
}
+Error
RawAddModule(char *dbmodulespec, char *modulespec)
{
SECMODModule *module;
diff --git a/security/nss/cmd/signver/pk7print.c b/security/nss/cmd/signver/pk7print.c
index 3310ec832..17bc45f56 100644
--- a/security/nss/cmd/signver/pk7print.c
+++ b/security/nss/cmd/signver/pk7print.c
@@ -144,7 +144,7 @@ sv_PrintValidity(FILE *out, CERTValidity *v, char *m)
void
sv_PrintObjectID(FILE *out, SECItem *oid, char *m)
{
- char *name;
+ const char *name;
SECOidData *oiddata;
oiddata = SECOID_FindOID(oid);
@@ -839,7 +839,7 @@ sv_PrintPKCS7Digested(FILE *out, SEC_PKCS7DigestedData *src)
int
sv_PrintPKCS7ContentInfo(FILE *out, SEC_PKCS7ContentInfo *src, char *m)
{
- char *desc;
+ const char *desc;
SECOidTag kind;
int rv;
diff --git a/security/nss/cmd/smimetools/cmsutil.c b/security/nss/cmd/smimetools/cmsutil.c
index f9e658a8c..92263f1bb 100644
--- a/security/nss/cmd/smimetools/cmsutil.c
+++ b/security/nss/cmd/smimetools/cmsutil.c
@@ -400,7 +400,7 @@ signed_data(struct signOptionsStr *signOptions)
fprintf(stderr, "password [NULL]\n");
fprintf(stderr, "certUsage [%d]\n", signOptions->options->certUsage);
if (signOptions->options->certHandle)
- fprintf(stderr, "certdb [%x]\n", signOptions->options->certHandle);
+ fprintf(stderr, "certdb [%p]\n", signOptions->options->certHandle);
else
fprintf(stderr, "certdb [NULL]\n");
if (signOptions->nickname)
@@ -1337,8 +1337,8 @@ main(int argc, char **argv)
pwcb = (options.password != NULL) ? ownpw : NULL;
pwcb_arg = (options.password != NULL) ? (void *)options.password : NULL;
if (cms_verbose) {
- fprintf(stderr, "cmsg [%x]\n", cmsg);
- fprintf(stderr, "arena [%x]\n", arena);
+ fprintf(stderr, "cmsg [%p]\n", cmsg);
+ fprintf(stderr, "arena [%p]\n", arena);
if (pwcb_arg)
fprintf(stderr, "password [%s]\n", (char *)pwcb_arg);
else
diff --git a/security/nss/cmd/ssltap/ssltap.c b/security/nss/cmd/ssltap/ssltap.c
index 70c77ce31..dbf5161b8 100644
--- a/security/nss/cmd/ssltap/ssltap.c
+++ b/security/nss/cmd/ssltap/ssltap.c
@@ -325,7 +325,8 @@ const char * V2CipherString(int cs_int) {
case 0x00ffe1: cs_str = "SSL3/RSA-FIPS/DES56-CBC/SHA"; break;
case 0x00ffe0: cs_str = "SSL3/RSA-FIPS/3DES192EDE-CBC/SHA"; break;
- default: cs_str = "????/????????/?????????/???"; break;
+ /* the string literal is broken up to avoid trigraphs */
+ default: cs_str = "????" "/????????" "/?????????" "/???"; break;
}
return cs_str;
diff --git a/security/nss/cmd/swfort/instinit/instinit.c b/security/nss/cmd/swfort/instinit/instinit.c
index f6e5e5e2f..dcc9e3245 100644
--- a/security/nss/cmd/swfort/instinit/instinit.c
+++ b/security/nss/cmd/swfort/instinit/instinit.c
@@ -264,7 +264,7 @@ main(int argc, char ** argv)
if (verbose) {
printf("Processing file %s ....\n",filename);
- printf(" Version %d\n",DER_GetInteger(&swfile->file.version));
+ printf(" Version %ld\n",DER_GetInteger(&swfile->file.version));
printf(" Issuer: %s\n",issuer);
printf(" Serial Number: ");
for (i=0; i < (int)swfile->file.serialID.len; i++) {
@@ -318,8 +318,7 @@ main(int argc, char ** argv)
}
continue;
}
- cert = (CERTCertificate *)
- __CERT_NewTempCertificate(certhandle,derCert, NULL,
+ cert = CERT_NewTempCertificate(certhandle, derCert, NULL,
PR_FALSE, PR_TRUE);
if (cert == NULL) {
if (verbose) {
diff --git a/security/nss/cmd/swfort/newuser/newuser.c b/security/nss/cmd/swfort/newuser/newuser.c
index 94e6c21ab..33b6b853a 100644
--- a/security/nss/cmd/swfort/newuser/newuser.c
+++ b/security/nss/cmd/swfort/newuser/newuser.c
@@ -43,6 +43,7 @@
/*#include "secmodi.h"*/
#include "cert.h"
#include "key.h"
+#include "nss.h"
#include "swforti.h"
#include "secutil.h"
#include "secrng.h"
@@ -603,7 +604,7 @@ extern void
fill_in(SECItem *item, unsigned char *data, int len);
char *userLabel = "INKS0002 ";
-main(int argc, char **argv)
+int main(int argc, char **argv)
{
char *progname = *argv++;
char *commonName = NULL;
diff --git a/security/nss/lib/base/arena.c b/security/nss/lib/base/arena.c
index 0e46da9c5..31bf5f485 100644
--- a/security/nss/lib/base/arena.c
+++ b/security/nss/lib/base/arena.c
@@ -52,6 +52,8 @@ static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
#include "prlock.h"
#include "plarena.h"
+#include <string.h>
+
/*
* NSSArena
*