mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +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);
| ^~~~~~~~~~~~
(cherry picked from commit 63ab0d926d
)
This commit is contained in:
parent
eaa3a4e396
commit
157c2ffeee
|
@ -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