mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 14:58:05 +02:00
libnm-core: suppress compiler warning in mac_address_parser()
@buf_len is always initialized when @buf_arr is set but gcc fails to
recognize it:
../libnm-core/nm-keyfile-reader.c: In function 'mac_address_parser':
../libnm-core/nm-keyfile-reader.c:654:36: error: 'buf_len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
tmp_string = nm_utils_hwaddr_ntoa (buf_arr, buf_len);
Fixes: 8eed67122c
This commit is contained in:
parent
938a4b35c6
commit
c827ad64cf
1 changed files with 1 additions and 1 deletions
|
|
@ -588,7 +588,7 @@ mac_address_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key
|
|||
gs_free char *tmp_string = NULL;
|
||||
const char *p, *mac_str;
|
||||
gs_free guint8 *buf_arr = NULL;
|
||||
guint buf_len;
|
||||
guint buf_len = 0;
|
||||
gsize length;
|
||||
|
||||
tmp_string = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue