mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 02:48:48 +00:00
Bugzilla bug 290233: fixed printf format related bugs reported as compiler
warnings. r=nelsonb. Modified Files: addbuiltin.c rsaperf.c vfychain.c
This commit is contained in:
parent
39a266dc9a
commit
a2bada0039
@ -37,7 +37,7 @@
|
||||
/*
|
||||
* Tool for converting builtin CA certs.
|
||||
*
|
||||
* $Id: addbuiltin.c,v 1.12 2005/04/02 06:21:20 julien.pierre.bugs%sun.com Exp $
|
||||
* $Id: addbuiltin.c,v 1.13 2005/04/13 23:03:15 wtchang%redhat.com Exp $
|
||||
*/
|
||||
|
||||
#include "nssrenam.h"
|
||||
@ -211,7 +211,7 @@ void printheader() {
|
||||
"#\n"
|
||||
"# ***** END LICENSE BLOCK *****\n"
|
||||
"#\n"
|
||||
"CVS_ID \"@(#) $RCSfile: addbuiltin.c,v $ $Revision: 1.12 $ $Date: 2005/04/02 06:21:20 $\"\n"
|
||||
"CVS_ID \"@(#) $RCSfile: addbuiltin.c,v $ $Revision: 1.13 $ $Date: 2005/04/13 23:03:15 $\"\n"
|
||||
"\n"
|
||||
"#\n"
|
||||
"# certdata.txt\n"
|
||||
@ -331,14 +331,15 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!addbuiltin.options[opt_Nickname].activated &&
|
||||
!addbuiltin.options[opt_Trust].activated) {
|
||||
fprintf(stderr, "%s: you must specify both a nickname and trust.\n");
|
||||
fprintf(stderr, "%s: you must specify both a nickname and trust.\n",
|
||||
progName);
|
||||
Usage(progName);
|
||||
}
|
||||
|
||||
if (addbuiltin.options[opt_Input].activated) {
|
||||
infile = PR_Open(addbuiltin.options[opt_Input].arg, PR_RDONLY, 00660);
|
||||
if (!infile) {
|
||||
fprintf(stderr, "%s: failed to open input file.\n");
|
||||
fprintf(stderr, "%s: failed to open input file.\n", progName);
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
|
@ -527,7 +527,7 @@ main(int argc, char **argv)
|
||||
keybits = DEFAULT_KEY_BITS;
|
||||
}
|
||||
|
||||
printf("Using PKCS#11 with %d bits session key in token %s.\n",
|
||||
printf("Using PKCS#11 with %ld bits session key in token %s.\n",
|
||||
keybits, PK11_GetTokenName(slot));
|
||||
|
||||
rsaparams.keySizeInBits = keybits;
|
||||
@ -573,7 +573,7 @@ main(int argc, char **argv)
|
||||
doKeyGen = PR_TRUE;
|
||||
}
|
||||
}
|
||||
printf("Using freebl with %d bits key.\n", keybits);
|
||||
printf("Using freebl with %ld bits key.\n", keybits);
|
||||
if (doKeyGen) {
|
||||
fprintf(stderr,"\nGenerating RSA key. "
|
||||
"This may take a few moments.\n");
|
||||
@ -593,7 +593,7 @@ main(int argc, char **argv)
|
||||
fprintf(stderr,"Keygen completed.\n");
|
||||
} else {
|
||||
/* use a hardcoded key */
|
||||
printf("Using hardcoded %d bits key.\n", keybits);
|
||||
printf("Using hardcoded %ld bits key.\n", keybits);
|
||||
if (doPub) {
|
||||
pubKey = getDefaultRSAPublicKey();
|
||||
} else {
|
||||
|
@ -201,12 +201,12 @@ readCertFile(const char * fileName, PRBool isAscii)
|
||||
if (cc < 0)
|
||||
return cert;
|
||||
if (!remaining || cc > 0) { /* file was too big. */
|
||||
fprintf(stderr, "cert file %s was too big.\n");
|
||||
fprintf(stderr, "cert file %s was too big.\n", fileName);
|
||||
return cert;
|
||||
}
|
||||
total = pb - certBuf;
|
||||
if (!total) { /* file was empty */
|
||||
fprintf(stderr, "cert file %s was empty.\n");
|
||||
fprintf(stderr, "cert file %s was empty.\n", fileName);
|
||||
return cert;
|
||||
}
|
||||
if (isAscii) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user