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;
      |                                     ^
This commit is contained in:
Richard W.M. Jones
2020-08-01 07:33:45 +01:00
parent 0b8ef5a98d
commit 2469b4b790

View File

@@ -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);