Fix compilier warnings on AIX, HP, Linux, and Solaris.

This commit is contained in:
relyea%netscape.com 2001-09-20 21:34:42 +00:00
Родитель 0e2a49491f
Коммит e141975d75
6 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -608,7 +608,6 @@ AppendAVA(char **bufp, unsigned *buflenp, CERTAVA *ava)
char *tagName;
char tmpBuf[384];
unsigned len, maxLen;
int lenLen;
int tag;
SECStatus rv;
SECItem *avaValue = NULL;

Просмотреть файл

@ -34,7 +34,7 @@
/*
* Certificate handling code
*
* $Id: certdb.c,v 1.14 2001-08-22 22:40:42 wtc%netscape.com Exp $
* $Id: certdb.c,v 1.15 2001-09-20 21:34:38 relyea%netscape.com Exp $
*/
#include "nssilock.h"
@ -1944,7 +1944,7 @@ CERT_ImportCerts(CERTCertDBHandle *certdb, SECCertUsage usage,
int i;
CERTCertificate **certs = NULL;
SECStatus rv;
int fcerts;
int fcerts = 0;
if ( ncerts ) {
certs = (CERTCertificate**)PORT_ZAlloc(sizeof(CERTCertificate *) * ncerts );
@ -1981,7 +1981,9 @@ CERT_ImportCerts(CERTCertDBHandle *certdb, SECCertUsage usage,
if ( retCerts ) {
*retCerts = certs;
} else {
CERT_DestroyCertArray(certs, fcerts);
if (certs) {
CERT_DestroyCertArray(certs, fcerts);
}
}
return(SECSuccess);
@ -2317,7 +2319,7 @@ loser:
* This lock is currently used for the following operations:
* adding or deleting a cert to either the temp or perm databases
* converting a temp to perm or perm to temp
* changing(maybe just adding????) the trust of a cert
* changing(maybe just adding !?) the trust of a cert
* chaning the DB status checking Configuration
*/
void

Просмотреть файл

@ -1137,6 +1137,7 @@ cert_CompareNameWithConstraints(CERTGeneralName *name,
nameString = (char*)PORT_ZAlloc(name->name.other.len + 1);
nameString = PORT_Strncpy(nameString, (char *) name->name.other.data,
name->name.other.len);
start = 0;
while(PORT_Strncmp(nameString + start, "://", 3) != 0 &&
nameString[start + 3] != '\0') {
start++;

Просмотреть файл

@ -34,7 +34,7 @@
/*
* Permanent Certificate database handling code
*
* $Id: pcertdb.c,v 1.17 2001-08-24 21:15:52 relyea%netscape.com Exp $
* $Id: pcertdb.c,v 1.18 2001-09-20 21:34:39 relyea%netscape.com Exp $
*/
#include "prtime.h"
@ -54,6 +54,7 @@
#include "base64.h"
#include "sechash.h"
#include "plhash.h"
#include "pk11func.h" /* sigh */
#include "cdbhdl.h"

Просмотреть файл

@ -238,7 +238,7 @@ SetupAVAValue(PRArenaPool *arena, int valueType, char *value, SECItem *it,
}
if (((valueType != SEC_ASN1_UNIVERSAL_STRING) && (valueLen > maxLen)) ||
(valueType == SEC_ASN1_UNIVERSAL_STRING) && (valueLen > (maxLen * 4))) {
((valueType == SEC_ASN1_UNIVERSAL_STRING) && (valueLen > (maxLen * 4)))) {
PORT_SetError(SEC_ERROR_INVALID_ARGS);
return SECFailure;
}

Просмотреть файл

@ -106,8 +106,9 @@ SECStatus CERT_EncodeBasicConstraintValue
}
}
if (SEC_ASN1EncodeItem (arena, encodedValue, &encodeContext,
CERTBasicConstraintsTemplate) == NULL)
CERTBasicConstraintsTemplate) == NULL) {
GEN_BREAK (SECFailure);
}
} while (0);
if (our_pool)
PORT_FreeArena (our_pool, PR_FALSE);