mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Silence MSVC C4312 in list tests
This warning warns on widening casts from integer to pointer type, because those casts can be problematic for porting to new pointer sizes. The code in question didn't do any bad things here so an intermediate cast to size_t was added to silence the warning
This commit is contained in:
parent
cdd53b9218
commit
d60b4010c4
@ -532,7 +532,9 @@ static void
|
||||
test_double_free (void)
|
||||
{
|
||||
GList *list, *link;
|
||||
GList intruder = { NULL, (gpointer)0xDEADBEEF, (gpointer)0xDEADBEEF };
|
||||
// Casts to size_t first ensure compilers won't warn about pointer casts that change size
|
||||
// MSVC's C4312 warning with /Wp64
|
||||
GList intruder = { NULL, (gpointer)(size_t)0xDEADBEEF, (gpointer)(size_t)0xDEADBEEF };
|
||||
|
||||
if (g_test_subprocess ())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user