mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +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 {
|
struct _NMUtilsStrStrDictKey {
|
||||||
char type;
|
char type;
|
||||||
char data[1];
|
char data[];
|
||||||
};
|
};
|
||||||
|
|
||||||
guint
|
guint
|
||||||
|
|
Loading…
Reference in a new issue