mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-18 02:50:30 +01:00
libnm/tests: avoid uninitialized variable warning in _invalid_option_write_handler()
src/libnm-core-impl/tests/test-keyfile.c: In function '_invalid_option_write_handler':
src/libnm-core-impl/tests/test-keyfile.c:917:9: error: 'message' may be used uninitialized [-Werror=maybe-uninitialized]
917 | g_assert(message && strstr(message, "ethtool.bogus"));
| ^
src/libnm-core-impl/tests/test-keyfile.c:905:29: note: 'message' was declared here
905 | const char *message;
| ^
lto1: all warnings being treated as errors
This commit is contained in:
parent
17601acd3d
commit
8d6349156b
1 changed files with 2 additions and 2 deletions
|
|
@ -901,8 +901,8 @@ _invalid_option_write_handler(NMConnection *connection,
|
|||
NMKeyfileHandlerData *handler_data,
|
||||
void *user_data)
|
||||
{
|
||||
InvalidOptionWriteData *data = user_data;
|
||||
const char *message;
|
||||
InvalidOptionWriteData *data = user_data;
|
||||
const char *message = NULL;
|
||||
NMKeyfileWarnSeverity severity;
|
||||
|
||||
g_assert(data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue