From 38f1409b40c2264ae1e36d809f55a719791df3ed Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 23 Mar 2023 11:26:12 +0000 Subject: [PATCH] testlibrary: Initialize autofree variable to silence a compiler warning As with commit 43085c0e "dir: Consistently initialize g_autofree variables", this is currently harmless because we never actually early-return or goto out of the region between declaration and initialization, but some compiler versions log a warning here anyway. Signed-off-by: Simon McVittie (cherry picked from commit cffc3aed5b9034e9b74ae60daba452ceb97ac9cc) --- tests/testlibrary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testlibrary.c b/tests/testlibrary.c index 315e7681..ccf7855b 100644 --- a/tests/testlibrary.c +++ b/tests/testlibrary.c @@ -207,7 +207,7 @@ test_installation_config (void) g_autofree char *path = NULL; g_autoptr(GFile) file = NULL; g_autoptr(GError) error = NULL; - g_autofree char *value; + g_autofree char *value = NULL; gboolean res; guint64 bytes;