mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
libnm: use flexible array member in NMUtilsStrStrDictKey
Otherwise, gcc-14.0.1-0.2.fc40 warns: ../src/libnm-core-impl/nm-utils.c: In function _nm_utils_strstrdictkey_create: ../src/libnm-core-impl/nm-utils.c:5076:16: error: allocation of insufficient size '1' for type 'NMUtilsStrStrDictKey' {aka 'struct _NMUtilsStrStrDictKey'} with size '2' [-Werror=alloc-size] 5076 | return g_malloc0(1); | ^~~~~~~~~~~~
This commit is contained in:
parent
5715feebe7
commit
63ab0d926d
|
@ -5008,7 +5008,7 @@ nm_utils_bond_mode_string_to_int(const char *mode)
|
|||
|
||||
struct _NMUtilsStrStrDictKey {
|
||||
char type;
|
||||
char data[1];
|
||||
char data[];
|
||||
};
|
||||
|
||||
guint
|
||||
|
|
Loading…
Reference in a new issue