summaryrefslogtreecommitdiff
path: root/libnm-core/nm-version.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-01-13 08:34:42 +0100
committerThomas Haller <thaller@redhat.com>2021-01-13 08:35:22 +0100
commit828e47f63275fce8ea0fd9b8510519fd3e3144a5 (patch)
treecd7a9ee64a7d9b34b5e0ec0bba98285384882b74 /libnm-core/nm-version.h
parent54feadd2c1989af865d36abdfb5f20b8a7bbf91e (diff)
downloadNetworkManager-828e47f63275fce8ea0fd9b8510519fd3e3144a5.tar.gz
device: set out-argument to nm_device_get_permanent_hw_address_full() in assertion case
When compiling with LTO, the compiler can think that an assertion failure (g_return*()) is regular code path, and thus that the output variable is not set. This can lead to "-Wmaybe-uninitialized" warnings in the caller, despite this not happening in non-bug case. Work aound that by setting the out argument. Warning with LTO enabled and gcc-10.2.1-9.fc33.s390x: src/nm-config-data.c: In function nm_config_data_get_device_config: src/devices/nm-device.c:17454:9: error: is_fake may be used uninitialized in this function [-Werror=maybe-uninitialized] 17454 | m = nm_match_spec_device(specs, | ^ src/devices/nm-device.c:17444:26: note: is_fake was declared here 17444 | gboolean is_fake; | ^ src/nm-config-data.c: In function nm_config_data_get_connection_default: src/devices/nm-device.c:17454:9: error: is_fake may be used uninitialized in this function [-Werror=maybe-uninitialized] 17454 | m = nm_match_spec_device(specs, | ^ src/devices/nm-device.c:17444:26: note: is_fake was declared here 17444 | gboolean is_fake; | ^ src/devices/nm-device.c: In function nm_device_check_unrealized_device_managed: src/devices/nm-device.c:17454:9: error: is_fake may be used uninitialized in this function [-Werror=maybe-uninitialized] 17454 | m = nm_match_spec_device(specs, | ^
Diffstat (limited to 'libnm-core/nm-version.h')
0 files changed, 0 insertions, 0 deletions