diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ckfw/instance.c | 22 | ||||
-rw-r--r-- | lib/softoken/pkcs11.c | 10 | ||||
-rw-r--r-- | lib/softoken/pkcs11u.c | 2 | ||||
-rw-r--r-- | lib/util/secoid.c | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/lib/ckfw/instance.c b/lib/ckfw/instance.c index cee56c97c..1a74e05d5 100644 --- a/lib/ckfw/instance.c +++ b/lib/ckfw/instance.c @@ -547,7 +547,7 @@ nssCKFWInstance_CreateSessionHandle( } *pError = nssCKFWHash_Add(fwInstance->sessionHandleHash, - (const void *)hSession, (const void *)fwSession); + (const void *)(uintptr_t)hSession, (const void *)fwSession); if (CKR_OK != *pError) { hSession = (CK_SESSION_HANDLE)0; goto done; @@ -580,7 +580,7 @@ nssCKFWInstance_ResolveSessionHandle( } fwSession = (NSSCKFWSession *)nssCKFWHash_Lookup( - fwInstance->sessionHandleHash, (const void *)hSession); + fwInstance->sessionHandleHash, (const void *)(uintptr_t)hSession); /* Assert(hSession == nssCKFWSession_GetHandle(fwSession)) */ @@ -611,9 +611,9 @@ nssCKFWInstance_DestroySessionHandle( } fwSession = (NSSCKFWSession *)nssCKFWHash_Lookup( - fwInstance->sessionHandleHash, (const void *)hSession); + fwInstance->sessionHandleHash, (const void *)(uintptr_t)hSession); if (fwSession) { - nssCKFWHash_Remove(fwInstance->sessionHandleHash, (const void *)hSession); + nssCKFWHash_Remove(fwInstance->sessionHandleHash, (const void *)(uintptr_t)hSession); nssCKFWSession_SetHandle(fwSession, (CK_SESSION_HANDLE)0); } @@ -682,7 +682,7 @@ nssCKFWInstance_CreateObjectHandle( } *pError = nssCKFWHash_Add(fwInstance->objectHandleHash, - (const void *)hObject, (const void *)fwObject); + (const void *)(uintptr_t)hObject, (const void *)fwObject); if (CKR_OK != *pError) { hObject = (CK_OBJECT_HANDLE)0; goto done; @@ -715,7 +715,7 @@ nssCKFWInstance_ResolveObjectHandle( } fwObject = (NSSCKFWObject *)nssCKFWHash_Lookup( - fwInstance->objectHandleHash, (const void *)hObject); + fwInstance->objectHandleHash, (const void *)(uintptr_t)hObject); /* Assert(hObject == nssCKFWObject_GetHandle(fwObject)) */ @@ -749,11 +749,11 @@ nssCKFWInstance_ReassignObjectHandle( } oldObject = (NSSCKFWObject *)nssCKFWHash_Lookup( - fwInstance->objectHandleHash, (const void *)hObject); + fwInstance->objectHandleHash, (const void *)(uintptr_t)hObject); if (oldObject) { /* Assert(hObject == nssCKFWObject_GetHandle(oldObject) */ (void)nssCKFWObject_SetHandle(oldObject, (CK_SESSION_HANDLE)0); - nssCKFWHash_Remove(fwInstance->objectHandleHash, (const void *)hObject); + nssCKFWHash_Remove(fwInstance->objectHandleHash, (const void *)(uintptr_t)hObject); } error = nssCKFWObject_SetHandle(fwObject, hObject); @@ -761,7 +761,7 @@ nssCKFWInstance_ReassignObjectHandle( goto done; } error = nssCKFWHash_Add(fwInstance->objectHandleHash, - (const void *)hObject, (const void *)fwObject); + (const void *)(uintptr_t)hObject, (const void *)fwObject); done: (void)nssCKFWMutex_Unlock(fwInstance->mutex); @@ -790,10 +790,10 @@ nssCKFWInstance_DestroyObjectHandle( } fwObject = (NSSCKFWObject *)nssCKFWHash_Lookup( - fwInstance->objectHandleHash, (const void *)hObject); + fwInstance->objectHandleHash, (const void *)(uintptr_t)hObject); if (fwObject) { /* Assert(hObject = nssCKFWObject_GetHandle(fwObject)) */ - nssCKFWHash_Remove(fwInstance->objectHandleHash, (const void *)hObject); + nssCKFWHash_Remove(fwInstance->objectHandleHash, (const void *)(uintptr_t)hObject); (void)nssCKFWObject_SetHandle(fwObject, (CK_SESSION_HANDLE)0); } diff --git a/lib/softoken/pkcs11.c b/lib/softoken/pkcs11.c index 4b701272c..ab71e60cc 100644 --- a/lib/softoken/pkcs11.c +++ b/lib/softoken/pkcs11.c @@ -2620,7 +2620,7 @@ sftk_SlotFromID(CK_SLOT_ID slotID, PRBool all) if (nscSlotHashTable[index] == NULL) return NULL; slot = (SFTKSlot *)PL_HashTableLookupConst(nscSlotHashTable[index], - (void *)slotID); + (void *)(uintptr_t)slotID); /* cleared slots shouldn't 'show up' */ if (slot && !all && !slot->present) slot = NULL; @@ -2690,7 +2690,7 @@ sftk_RegisterSlot(SFTKSlot *slot, unsigned int moduleIndex) } } - entry = PL_HashTableAdd(nscSlotHashTable[index], (void *)slot->slotID, slot); + entry = PL_HashTableAdd(nscSlotHashTable[index], (void *)(uintptr_t)slot->slotID, slot); if (entry == NULL) { return CKR_HOST_MEMORY; } @@ -3223,12 +3223,12 @@ nscFreeAllSlots(unsigned int moduleIndex) for (i = 0; i < (int)tmpSlotCount; i++) { slotID = tmpSlotList[i]; slot = (SFTKSlot *) - PL_HashTableLookup(tmpSlotHashTable, (void *)slotID); + PL_HashTableLookup(tmpSlotHashTable, (void *)(uintptr_t)slotID); PORT_Assert(slot); if (!slot) continue; SFTK_DestroySlotData(slot); - PL_HashTableRemove(tmpSlotHashTable, (void *)slotID); + PL_HashTableRemove(tmpSlotHashTable, (void *)(uintptr_t)slotID); } PORT_Free(tmpSlotList); PL_HashTableDestroy(tmpSlotHashTable); @@ -3243,7 +3243,7 @@ sftk_closePeer(PRBool isFIPS) unsigned int moduleIndex = isFIPS ? NSC_NON_FIPS_MODULE : NSC_FIPS_MODULE; PLHashTable *tmpSlotHashTable = nscSlotHashTable[moduleIndex]; - slot = (SFTKSlot *)PL_HashTableLookup(tmpSlotHashTable, (void *)slotID); + slot = (SFTKSlot *)PL_HashTableLookup(tmpSlotHashTable, (void *)(uintptr_t)slotID); if (slot == NULL) { return; } diff --git a/lib/softoken/pkcs11u.c b/lib/softoken/pkcs11u.c index 5299a700a..1d0f8dacf 100644 --- a/lib/softoken/pkcs11u.c +++ b/lib/softoken/pkcs11u.c @@ -904,7 +904,7 @@ sftk_AddAttributeType(SFTKObject *object, CK_ATTRIBUTE_TYPE type, static SECItem * sftk_lookupTokenKeyByHandle(SFTKSlot *slot, CK_OBJECT_HANDLE handle) { - return (SECItem *)PL_HashTableLookup(slot->tokObjHashTable, (void *)handle); + return (SECItem *)PL_HashTableLookup(slot->tokObjHashTable, (void *)(uintptr_t)handle); } /* diff --git a/lib/util/secoid.c b/lib/util/secoid.c index b10f859fb..d340dd953 100644 --- a/lib/util/secoid.c +++ b/lib/util/secoid.c @@ -2118,7 +2118,7 @@ SECOID_Init(void) if (oid->mechanism != CKM_INVALID_MECHANISM) { entry = PL_HashTableAdd(oidmechhash, - (void *)oid->mechanism, (void *)oid); + (void *)(uintptr_t)oid->mechanism, (void *)oid); if (entry == NULL) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); PORT_Assert(0); /* This function should never fail. */ @@ -2139,7 +2139,7 @@ SECOID_FindOIDByMechanism(unsigned long mechanism) PR_ASSERT(oidhash != NULL); - ret = PL_HashTableLookupConst(oidmechhash, (void *)mechanism); + ret = PL_HashTableLookupConst(oidmechhash, (void *)(uintptr_t)mechanism); if (ret == NULL) { PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); } |