Bugzilla bug 131078: fixed compiler warnings. r=mcgreer.

git-svn-id: svn://10.0.0.236/trunk@116631 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%netscape.com 2002-03-15 06:07:41 +00:00
parent b9e619bac1
commit 4d2eddeffb
13 changed files with 27 additions and 19 deletions

View File

@ -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);
}

View File

@ -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");

View File

@ -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;
}

View File

@ -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);

View File

@ -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"

View File

@ -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);

View File

@ -316,6 +316,7 @@ RawListModule(char *modulespec)
return SUCCESS;
}
Error
RawAddModule(char *dbmodulespec, char *modulespec)
{
SECMODModule *module;

View File

@ -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;

View File

@ -34,7 +34,7 @@
/*
* cmsutil -- A command to work with CMS data
*
* $Id: cmsutil.c,v 1.28 2001-12-07 02:09:45 jpierre%netscape.com Exp $
* $Id: cmsutil.c,v 1.29 2002-03-15 06:04:30 wtc%netscape.com Exp $
*/
#include "nspr.h"
@ -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

View File

@ -60,7 +60,7 @@
#include "plgetopt.h"
#define VERSIONSTRING "$Revision: 1.1 $ ($Date: 2000-03-31 20:12:54 $) $Author: relyea%netscape.com $"
#define VERSIONSTRING "$Revision: 1.2 $ ($Date: 2002-03-15 06:04:32 $) $Author: wtc%netscape.com $"
struct _DataBufferList;
@ -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;

View File

@ -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) {

View File

@ -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;

View File

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.3 $ $Date: 2001-10-08 19:26:01 $ $Name: not supported by cvs2svn $";
static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.4 $ $Date: 2002-03-15 06:04:37 $ $Name: not supported by cvs2svn $";
#endif /* DEBUG */
/*
@ -52,6 +52,8 @@ static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.3 $ $Date:
#include "prlock.h"
#include "plarena.h"
#include <string.h>
/*
* NSSArena
*