]> xenbits.xensource.com Git - xen.git/commit
tools/libxl: Fix uninitialised variable in libxl__write_stub_dmargs()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Feb 2021 17:44:36 +0000 (17:44 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 17 Feb 2021 12:37:08 +0000 (12:37 +0000)
commitb4159d2de0153eb8ce6aced1978e1917c07cf39d
treeba072ada1b08978587b1851f1fafc303eb62861e
parent928bffb6dd3f1b8a2355418f4c763a6fff714aa7
tools/libxl: Fix uninitialised variable in libxl__write_stub_dmargs()

Various version of gcc, when compiling with -Og, complain:

  libxl_dm.c: In function ‘libxl__write_stub_dmargs’:
  libxl_dm.c:2166:16: error: ‘dmargs’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
               rc = libxl__xs_write_checked(gc, t, path, dmargs);
               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It isn't actually used while uninitialised, but only because of how the
is_linux_stubdom checks line up.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/libs/light/libxl_dm.c