mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Fix constant type to match assigned variable type
Some compilers assume a literal value is a certain byte-length without checking the type to which it is being assigned, giving a compile-time warning: a default of 'long' is a mismatch when assigning to a guint64 when the latter is a 'long long'. Use one of glib's standard macros to specify the type of the constant to match the variable type. https://bugzilla.gnome.org/show_bug.cgi?id=688829
This commit is contained in:
parent
69ad5010e3
commit
1fec9ac47d
@ -225,8 +225,8 @@ test_swap (void)
|
||||
|
||||
g_assert_cmpint (GUINT32_SWAP_LE_BE (a32), ==, b32);
|
||||
|
||||
a64 = 0xaaaaaaaabbbbbbbb;
|
||||
b64 = 0xbbbbbbbbaaaaaaaa;
|
||||
a64 = G_GUINT64_CONSTANT(0xaaaaaaaabbbbbbbb);
|
||||
b64 = G_GUINT64_CONSTANT(0xbbbbbbbbaaaaaaaa);
|
||||
|
||||
g_assert_cmpint (GUINT64_SWAP_LE_BE (a64), ==, b64);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user