libDtSvc: Resolve 28 compiler warnings.
This commit is contained in:
@@ -152,7 +152,7 @@ void ** _DtUtilGetHash(DtHashTbl t, const unsigned char * key)
|
||||
if(tbl->hash_type == String_Key)
|
||||
tmp = tbl->table[bucket = hash_string(key, tbl->size)];
|
||||
else
|
||||
tmp = tbl->table[bucket = abs((int)key) % tbl->size];
|
||||
tmp = tbl->table[bucket = abs((int)(intptr_t)key) % tbl->size];
|
||||
|
||||
if(tbl->hash_type == String_Key)
|
||||
while(tmp!=NULL)
|
||||
@@ -205,7 +205,7 @@ void ** _DtUtilFindHash(DtHashTbl t, const unsigned char * key)
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = tbl->table[abs((int)key) % tbl->size];
|
||||
tmp = tbl->table[abs((int)(intptr_t)key) % tbl->size];
|
||||
for(;tmp!=NULL; tmp = tmp->next_entry)
|
||||
if(tmp->key == key)
|
||||
return((void *)&tmp->data);
|
||||
@@ -224,7 +224,7 @@ void * _DtUtilDelHash(DtHashTbl t, const unsigned char * key)
|
||||
if(tbl->hash_type == String_Key)
|
||||
bucket = hash_string(key, tbl->size);
|
||||
else
|
||||
bucket = abs((int)key) % tbl->size;
|
||||
bucket = abs((int)(intptr_t)key) % tbl->size;
|
||||
|
||||
if((tmp = tbl->table[bucket])==NULL)
|
||||
return(NULL);
|
||||
|
||||
Reference in New Issue
Block a user