mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 17:30:42 +01:00
libnm/tests: fix maybe-uninitialized warning in "test-setting"
In function '_nm_auto_g_free',
inlined from 'test_tc_config_tfilter_matchall_mirred' at src/libnm-core-impl/tests/test-setting.c:2955:24:
./src/libnm-glib-aux/nm-macros-internal.h:58:1: error: 'str' may be used uninitialized [-Werror=maybe-uninitialized]
58 | NM_AUTO_DEFINE_FCN_VOID0(void *, _nm_auto_g_free, g_free);
| ^
src/libnm-core-impl/tests/test-setting.c: In function 'test_tc_config_tfilter_matchall_mirred':
src/libnm-core-impl/tests/test-setting.c:2955:24: note: 'str' was declared here
2955 | gs_free char *str;
| ^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
(cherry picked from commit 6f0e22a64a)
(cherry picked from commit 6329f1db5a)
(cherry picked from commit d3fdb854f9)
This commit is contained in:
parent
c65a57108e
commit
40f51f0ffa
1 changed files with 1 additions and 1 deletions
|
|
@ -2653,7 +2653,7 @@ test_tc_config_tfilter_matchall_mirred(void)
|
|||
NMTCTfilter * tfilter1;
|
||||
GError * error = NULL;
|
||||
gs_strfreev char **attr_names = NULL;
|
||||
gs_free char * str;
|
||||
gs_free char * str = NULL;
|
||||
GVariant * variant;
|
||||
|
||||
tfilter1 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue