diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-02-21 11:35:08 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-02-21 19:35:43 +0000 |
commit | 1694e81abe724725edcc31bbecfc0787657e2c13 (patch) | |
tree | 5458b4f8532c5f1004e31b1c62b47f81d89f772f | |
parent | ffeadb721f69db825ef94bcc937c93db387d26cb (diff) | |
download | wireshark-1694e81abe724725edcc31bbecfc0787657e2c13.tar.gz |
The shortening to 32 bits is intentional, so add a cast.
The cast reassures the compiler that we do, in fact, know what we're
doing, so it doesn't issue a warning.
Change-Id: Ie3bc4e1c955f9c5cad5506e26fc72e12f7a8f854
Reviewed-on: https://code.wireshark.org/review/7295
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/to_str.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index 45c9ebef80..32ac48262d 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -116,17 +116,17 @@ dword_to_hex_punct(char *out, guint32 dword, char punct) char * qword_to_hex(char *out, guint64 qword) { - out = dword_to_hex(out, qword >> 32); - out = dword_to_hex(out, qword & 0xffffffff); + out = dword_to_hex(out, (guint32)(qword >> 32)); + out = dword_to_hex(out, (guint32)(qword & 0xffffffff)); return out; } char * qword_to_hex_punct(char *out, guint64 qword, char punct) { - out = dword_to_hex_punct(out, qword >> 32, punct); + out = dword_to_hex_punct(out, (guint32)(qword >> 32), punct); *out++ = punct; - out = dword_to_hex_punct(out, qword & 0xffffffff, punct); + out = dword_to_hex_punct(out, (guint32)(qword & 0xffffffff), punct); return out; } |