From 2469b4b790d81154f650f33b49f56c155504a8e2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 1 Aug 2020 07:33:45 +0100 Subject: [PATCH] rescue: Initialize roots. Even though it seems clear from the code that roots cannot be used uninitialized, GCC 10.1 cannot seem to work it out (possibly an LTO bug). Easiest way out here is to just initialize it. rescue.c:396:37: error: 'roots' may be used uninitialized in this function [-Werror=maybe-uninitialized] 396 | CLEANUP_FREE_STRING_LIST char **roots; | ^ --- rescue/rescue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rescue/rescue.c b/rescue/rescue.c index 961b1af2e..37e6d3587 100644 --- a/rescue/rescue.c +++ b/rescue/rescue.c @@ -393,7 +393,7 @@ main (int argc, char *argv[]) /* Also bind-mount /dev etc under /sysroot, if -i was given. */ if (inspector) { - CLEANUP_FREE_STRING_LIST char **roots; + CLEANUP_FREE_STRING_LIST char **roots = NULL; int windows; roots = guestfs_inspect_get_roots (g);