libDtSvc: Resolve 28 compiler warnings.

This commit is contained in:
Peter Howkins
2015-01-14 14:10:55 +00:00
parent 49266f9019
commit 5c8f66a07d
12 changed files with 31 additions and 19 deletions

View File

@@ -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);