[MSVC 2015] Try to fix warinings turned errors.

Change-Id: Ife5aba55d6953fbd3874095f2e469a844ca8ef2e
Reviewed-on: https://code.wireshark.org/review/8762
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Anders 2015-06-04 16:12:04 +02:00 committed by Anders Broman
parent 505d3038fc
commit fde38c099f
2 changed files with 3 additions and 3 deletions

View File

@ -650,7 +650,7 @@ static void
free_GPtrArray_value(gpointer key, gpointer value, gpointer user_data _U_)
{
GPtrArray *ptrs = (GPtrArray *)value;
gint hfid = (gint)(long)key;
gint hfid = GPOINTER_TO_UINT(key);
header_field_info *hfinfo;
PROTO_REGISTRAR_GET_NTH(hfid, hfinfo);

View File

@ -92,7 +92,7 @@ static guint stream_hash_func(gconstpointer k)
const stream_key_t *key = (const stream_key_t *)k;
/* is_circuit is redundant to the circuit/conversation pointer */
return ((guint)(unsigned long)key->circ.circuit) ^ key->p2p_dir;
return (GPOINTER_TO_UINT(key->circ.circuit)) ^ key->p2p_dir;
}
/* compare func */
@ -238,7 +238,7 @@ typedef struct fragment_key {
static guint fragment_hash_func(gconstpointer k)
{
const fragment_key_t *key = (const fragment_key_t *)k;
return ((guint)(unsigned long)key->stream) + ((guint)key -> framenum) + ((guint)key->offset);
return (GPOINTER_TO_UINT(key->stream)) + ((guint)key -> framenum) + ((guint)key->offset);
}
/* compare func */