mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
tests: Silence set-but-not-used warnings for variables in autoptr test
Clang decides that `p` and `p2` are set but not used. Try a bit harder to trick it. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -20,6 +20,9 @@ test_autofree (void)
|
|||||||
p = g_malloc (10);
|
p = g_malloc (10);
|
||||||
p2 = g_malloc (42);
|
p2 = g_malloc (42);
|
||||||
|
|
||||||
|
p[0] = 1;
|
||||||
|
p2[0] = 1;
|
||||||
|
|
||||||
if (TRUE)
|
if (TRUE)
|
||||||
{
|
{
|
||||||
g_autofree guint8 *buf = g_malloc (128);
|
g_autofree guint8 *buf = g_malloc (128);
|
||||||
|
Reference in New Issue
Block a user