From b213eed50727382bf3cd16261c9f0b69335ef4d5 Mon Sep 17 00:00:00 2001 From: "relyea%netscape.com" Date: Thu, 20 Sep 2001 22:09:49 +0000 Subject: [PATCH] Fix compiler warnings on HP, Linux, Solaris, and AIX. --- security/nss/lib/ckfw/builtins/constants.c | 4 ++-- security/nss/lib/ckfw/find.c | 4 ++-- security/nss/lib/ckfw/mutex.c | 3 +-- security/nss/lib/ckfw/object.c | 4 ++-- security/nss/lib/ckfw/session.c | 4 ++-- security/nss/lib/ckfw/sessobj.c | 6 +++--- security/nss/lib/ckfw/token.c | 6 +++--- security/nss/lib/ckfw/wrap.c | 5 ++--- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/security/nss/lib/ckfw/builtins/constants.c b/security/nss/lib/ckfw/builtins/constants.c index d5fb10eaa935..b5f52794639b 100644 --- a/security/nss/lib/ckfw/builtins/constants.c +++ b/security/nss/lib/ckfw/builtins/constants.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: constants.c,v $ $Revision: 1.3 $ $Date: 2000/09/06 22:24:00 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: constants.c,v $ $Revision: 1.4 $ $Date: 2001/09/20 22:09:49 $ $Name: $"; #endif /* DEBUG */ /* @@ -62,7 +62,7 @@ NSS_IMPLEMENT_DATA const CK_VERSION nss_builtins_LibraryVersion = { 1, 0 }; NSS_IMPLEMENT_DATA const NSSUTF8 * -nss_builtins_SlotDescription = ""; +nss_builtins_SlotDescription = (NSSUTF8 *) ""; NSS_IMPLEMENT_DATA const CK_VERSION nss_builtins_HardwareVersion = { 1, 0 }; diff --git a/security/nss/lib/ckfw/find.c b/security/nss/lib/ckfw/find.c index 60f7e5ef8bc5..087a264073ad 100644 --- a/security/nss/lib/ckfw/find.c +++ b/security/nss/lib/ckfw/find.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: find.c,v $ $Revision: 1.1 $ $Date: 2000/03/31 19:43:14 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: find.c,v $ $Revision: 1.2 $ $Date: 2001/09/20 22:09:45 $ $Name: $"; #endif /* DEBUG */ /* @@ -134,7 +134,7 @@ nssCKFWFindObjects_Create CK_RV *pError ) { - NSSCKFWFindObjects *fwFindObjects; + NSSCKFWFindObjects *fwFindObjects = NULL; NSSArena *arena; NSSCKMDSession *mdSession; NSSCKMDToken *mdToken; diff --git a/security/nss/lib/ckfw/mutex.c b/security/nss/lib/ckfw/mutex.c index 386c333e6b63..0a16087cd0f7 100644 --- a/security/nss/lib/ckfw/mutex.c +++ b/security/nss/lib/ckfw/mutex.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: mutex.c,v $ $Revision: 1.1 $ $Date: 2000/03/31 19:43:26 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: mutex.c,v $ $Revision: 1.2 $ $Date: 2001/09/20 22:09:46 $ $Name: $"; #endif /* DEBUG */ /* @@ -136,7 +136,6 @@ nssCKFWMutex_Create NSSCKFWMutex *mutex; CK_ULONG count = (CK_ULONG)0; CK_BBOOL os_ok = CK_FALSE; - CK_VOID_PTR pMutex = (CK_VOID_PTR)NULL; if( (CK_C_INITIALIZE_ARGS_PTR)NULL != pInitArgs ) { if( (CK_CREATEMUTEX )NULL != pInitArgs->CreateMutex ) count++; diff --git a/security/nss/lib/ckfw/object.c b/security/nss/lib/ckfw/object.c index 6c10f86d6df2..52132cab5e52 100644 --- a/security/nss/lib/ckfw/object.c +++ b/security/nss/lib/ckfw/object.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: object.c,v $ $Revision: 1.5 $ $Date: 2001/08/23 00:00:05 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: object.c,v $ $Revision: 1.6 $ $Date: 2001/09/20 22:09:46 $ $Name: $"; #endif /* DEBUG */ /* @@ -948,9 +948,9 @@ NSSCKFWObject_GetAttributeTypes CK_ULONG ulCount ) { +#ifdef DEBUG CK_RV error = CKR_OK; -#ifdef DEBUG error = nssCKFWObject_verifyPointer(fwObject); if( CKR_OK != error ) { return error; diff --git a/security/nss/lib/ckfw/session.c b/security/nss/lib/ckfw/session.c index 4e07c866e9db..570720cbc2e6 100644 --- a/security/nss/lib/ckfw/session.c +++ b/security/nss/lib/ckfw/session.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: session.c,v $ $Revision: 1.5 $ $Date: 2000/09/13 21:15:07 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: session.c,v $ $Revision: 1.6 $ $Date: 2001/09/20 22:09:46 $ $Name: $"; #endif /* DEBUG */ /* @@ -1909,9 +1909,9 @@ NSSCKFWSession_CallNotification CK_NOTIFICATION event ) { +#ifdef DEBUG CK_RV error = CKR_OK; -#ifdef DEBUG error = nssCKFWSession_verifyPointer(fwSession); if( CKR_OK != error ) { return error; diff --git a/security/nss/lib/ckfw/sessobj.c b/security/nss/lib/ckfw/sessobj.c index 2b215a1222a7..edcbc89561af 100644 --- a/security/nss/lib/ckfw/sessobj.c +++ b/security/nss/lib/ckfw/sessobj.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: sessobj.c,v $ $Revision: 1.5 $ $Date: 2000/09/06 22:23:56 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: sessobj.c,v $ $Revision: 1.6 $ $Date: 2001/09/20 22:09:46 $ $Name: $"; #endif /* DEBUG */ /* @@ -200,7 +200,7 @@ nss_ckmdSessionObject_GetAttributeSize CK_RV *pError ); -static NSSItem * +static const NSSItem * nss_ckmdSessionObject_GetAttribute ( NSSCKMDObject *mdObject, @@ -580,7 +580,7 @@ nss_ckmdSessionObject_GetAttributeSize * nss_ckmdSessionObject_GetAttribute * */ -static NSSItem * +static const NSSItem * nss_ckmdSessionObject_GetAttribute ( NSSCKMDObject *mdObject, diff --git a/security/nss/lib/ckfw/token.c b/security/nss/lib/ckfw/token.c index f4332e168cb9..ed9341d42d0a 100644 --- a/security/nss/lib/ckfw/token.c +++ b/security/nss/lib/ckfw/token.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: token.c,v $ $Revision: 1.4 $ $Date: 2000/09/06 22:23:57 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: token.c,v $ $Revision: 1.5 $ $Date: 2001/09/20 22:09:46 $ $Name: $"; #endif /* DEBUG */ /* @@ -1405,7 +1405,7 @@ nssCKFWToken_GetMechanismCount } #endif /* NSSDEBUG */ - if( (void *)NULL == fwToken->mdToken->GetMechanismCount ) { + if( (void *)NULL == (void *)fwToken->mdToken->GetMechanismCount ) { return 0; } @@ -1434,7 +1434,7 @@ nssCKFWToken_GetMechanismTypes } #endif /* NSSDEBUG */ - if( (void *)NULL == fwToken->mdToken->GetMechanismTypes ) { + if( (void *)NULL == (void *)fwToken->mdToken->GetMechanismTypes ) { /* * This should only be called with a sufficiently-large * "types" array, which can only be done if GetMechanismCount diff --git a/security/nss/lib/ckfw/wrap.c b/security/nss/lib/ckfw/wrap.c index 7831e3c4309e..02a6b4aef8ff 100644 --- a/security/nss/lib/ckfw/wrap.c +++ b/security/nss/lib/ckfw/wrap.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: wrap.c,v $ $Revision: 1.3 $ $Date: 2000/09/06 22:23:57 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: wrap.c,v $ $Revision: 1.4 $ $Date: 2001/09/20 22:09:47 $ $Name: $"; #endif /* DEBUG */ /* @@ -683,9 +683,8 @@ NSSCKFWC_WaitForSlotEvent for( i = 0; i < nSlots; i++ ) { if( fwSlot == slots[i] ) { *pSlot = (CK_SLOT_ID)(CK_ULONG)(i+1); + return CKR_OK; } - - return CKR_OK; } error = CKR_GENERAL_ERROR; /* returned something not in the slot list */