tools/libxl: Work around unintialised variable libxl__domain_get_device_model_uid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Feb 2021 15:29:12 +0000 (15:29 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 19 Feb 2021 17:10:33 +0000 (17:10 +0000)
commit2ff2adc61fcfa09118b76b4b64cbf8a78f7f2882
treed9735e94bc9895bece1b7326e7bfe252f43cbaa1
parent336fbbdf61562e5ae1112f24bc90c1164adf2144
tools/libxl: Work around unintialised variable libxl__domain_get_device_model_uid()

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

  libxl_dm.c: In function 'libxl__domain_get_device_model_uid':
  libxl_dm.c:256:12: error: 'kill_by_uid' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    256 |         if (kill_by_uid)
        |            ^

The logic is very tangled.  Set kill_by_uid on every path.

No funcational change.

Requested-by: Ian Jackson <iwj@xenproject.org>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Not-acked-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