diff options
author | wtc%google.com <devnull@localhost> | 2012-12-06 17:56:58 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2012-12-06 17:56:58 +0000 |
commit | 6044db0799bfb61e51f6543a7adc6d5c469b6b61 (patch) | |
tree | 7f81c0b093e933bcc305a9861884f01dbd884b60 | |
parent | de14c676a55b9ababe1e5ffa6865173a72c64c38 (diff) | |
download | nss-hg-6044db0799bfb61e51f6543a7adc6d5c469b6b61.tar.gz |
Bug 818741: cast the 'arg' argument of LOG_ERROR_OR_EXIT and LOG_ERROR
to void * via an intermediate cast to PRWord to avoid the gcc compiler
warning "cast to pointer from integer of different size". Declare the
error/errorCode argument of cert_AddToVerifyLog as a (signed) long
because NSS/NSPR error codes are negative numbers. r=mentovai.
Modified Files:
lib/certdb/certi.h lib/certhigh/certvfy.c
-rw-r--r-- | security/nss/lib/certdb/certi.h | 2 | ||||
-rw-r--r-- | security/nss/lib/certhigh/certvfy.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/security/nss/lib/certdb/certi.h b/security/nss/lib/certdb/certi.h index 068509749..2b783ae37 100644 --- a/security/nss/lib/certdb/certi.h +++ b/security/nss/lib/certdb/certi.h @@ -291,7 +291,7 @@ extern SECStatus cert_GetCertType(CERTCertificate *cert); extern PRUint32 cert_ComputeCertType(CERTCertificate *cert); void cert_AddToVerifyLog(CERTVerifyLog *log,CERTCertificate *cert, - unsigned long errorCode, unsigned int depth, + long errorCode, unsigned int depth, void *arg); /* Insert a DER CRL into the CRL cache, and take ownership of it. diff --git a/security/nss/lib/certhigh/certvfy.c b/security/nss/lib/certhigh/certvfy.c index 9622a5f35..d4919b46d 100644 --- a/security/nss/lib/certhigh/certvfy.c +++ b/security/nss/lib/certhigh/certvfy.c @@ -229,7 +229,7 @@ loser: } void -cert_AddToVerifyLog(CERTVerifyLog *log, CERTCertificate *cert, unsigned long error, +cert_AddToVerifyLog(CERTVerifyLog *log, CERTCertificate *cert, long error, unsigned int depth, void *arg) { CERTVerifyLogNode *node, *tnode; @@ -290,14 +290,16 @@ cert_AddToVerifyLog(CERTVerifyLog *log, CERTCertificate *cert, unsigned long err #define LOG_ERROR_OR_EXIT(log,cert,depth,arg) \ if ( log != NULL ) { \ - cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void *)arg); \ + cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, \ + (void *)(PRWord)arg); \ } else { \ goto loser; \ } #define LOG_ERROR(log,cert,depth,arg) \ if ( log != NULL ) { \ - cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, (void *)arg); \ + cert_AddToVerifyLog(log, cert, PORT_GetError(), depth, \ + (void *)(PRWord)arg); \ } static SECStatus |