mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 17:10:21 +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
This commit is contained in:
parent
f73088a885
commit
6f0e22a64a
1 changed files with 1 additions and 1 deletions
|
|
@ -2952,7 +2952,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