mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 23:20:15 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue