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>
This commit is contained in:
Guy Harris 2015-02-21 11:35:08 -08:00
parent ffeadb721f
commit 1694e81abe
1 changed files with 4 additions and 4 deletions

View File

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