From 76729e5d0fdd675b3c070a33ab5bad7e0f8209da Mon Sep 17 00:00:00 2001 From: Sebastien Tandel Date: Tue, 29 May 2007 02:43:18 +0000 Subject: From David Howells : Fix compilation failures when building wireshark-0.99.6-SVN-21916 on an x86_64-unknown-linux-gnu target with gcc version 4.1.2 20070403 (Red Hat 4.1.2-8). The failures fall into two categories: (1) Casts between pointers and 32-bit integers without an intermediary cast via 'long' or 'unsigned long'. This results in a compiler warning complaining about casts between a pointer and an integer of a different size. (2) Passing values to "%lld" or similar printf-style format options that the compiler thinks are a different size. Such values need to be cast to 'long long' or 'unsigned long long'. svn path=/trunk/; revision=21975 --- epan/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/stream.c') diff --git a/epan/stream.c b/epan/stream.c index bf264e1b83..434ed23fd1 100644 --- a/epan/stream.c +++ b/epan/stream.c @@ -106,7 +106,7 @@ 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)key->circ.circuit) ^ key->p2p_dir; + return ((guint)(unsigned long)key->circ.circuit) ^ key->p2p_dir; } /* compare func */ @@ -278,7 +278,7 @@ typedef struct fragment_key { guint fragment_hash_func(gconstpointer k) { const fragment_key_t *key = (const fragment_key_t *)k; - return ((guint)key->stream) + ((guint)key -> framenum) + ((guint)key->offset); + return ((guint)(unsigned long)key->stream) + ((guint)key -> framenum) + ((guint)key->offset); } /* compare func */ -- cgit v1.2.3