From 860dc949ca01cd452813de59b6e078d0d1f18f7c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 6 Oct 2017 12:57:06 +0100 Subject: [PATCH] tests: Add some assertions on some otherwise-unused variables Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=751738 --- glib/tests/autoptr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c index b44cf138b..754999cf1 100644 --- a/glib/tests/autoptr.c +++ b/glib/tests/autoptr.c @@ -17,6 +17,8 @@ test_autofree (void) g_autofree gchar *alwaysnull_again = NULL; buf[0] = 1; + + g_assert_null (alwaysnull_again); } if (TRUE) @@ -25,6 +27,8 @@ test_autofree (void) buf2[255] = 42; } + + g_assert_null (alwaysnull); } static void @@ -226,6 +230,7 @@ test_g_queue (void) g_autoptr(GQueue) val = g_queue_new (); g_auto(GQueue) stackval = G_QUEUE_INIT; g_assert (val != NULL); + g_assert_null (stackval.head); } static void