mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -393,7 +393,7 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
/* Also bind-mount /dev etc under /sysroot, if -i was given. */
|
/* Also bind-mount /dev etc under /sysroot, if -i was given. */
|
||||||
if (inspector) {
|
if (inspector) {
|
||||||
CLEANUP_FREE_STRING_LIST char **roots;
|
CLEANUP_FREE_STRING_LIST char **roots = NULL;
|
||||||
int windows;
|
int windows;
|
||||||
|
|
||||||
roots = guestfs_inspect_get_roots (g);
|
roots = guestfs_inspect_get_roots (g);
|
||||||
|
|||||||
Reference in New Issue
Block a user