Use GINT_TO_POINTER() to cast integral values to gpointer in

g_hash_table_lookup() calls, in the hopes of suppressing warnings on
platforms with 32-bit ints and 64-bit pointers.

svn path=/trunk/; revision=26149
This commit is contained in:
Guy Harris 2008-09-06 17:27:20 +00:00
parent ad54e4ed0e
commit 768b822f9b
1 changed files with 2 additions and 2 deletions

View File

@ -676,7 +676,7 @@ static void get_pdu_fields(gpointer k, gpointer v, gpointer p) {
gchar* s;
fis = (GPtrArray*) g_hash_table_lookup(data->interesting,(gpointer) hfid);
fis = (GPtrArray*) g_hash_table_lookup(data->interesting,GINT_TO_POINTER(hfid));
if (fis) {
for (i = 0; i < fis->len; i++) {
@ -860,7 +860,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) {
cfg = g_ptr_array_index(mc->pducfglist,i);
dbg_print (dbg_pdu,4,dbg_facility,"mate_analyze_frame: tryning to extract: %s",cfg->name);
protos = (GPtrArray*) g_hash_table_lookup(tree->tree_data->interesting_hfids,(gpointer) cfg->hfid_proto);
protos = (GPtrArray*) g_hash_table_lookup(tree->tree_data->interesting_hfids,GINT_TO_POINTER(cfg->hfid_proto));
if (protos) {
pdu = NULL;