mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-19 19:30:40 +02:00
libnm: fix uninitialized variable in get_system_encodings()
CC libnm-core/libnm_core_libnm_core_la-nm-utils.lo
libnm-core/nm-utils.c:210:6: error: variable 'encodings' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (lang) {
^~~~
libnm-core/nm-utils.c:220:7: note: uninitialized use occurs here
if (!encodings) {
^~~~~~~~~
libnm-core/nm-utils.c:210:2: note: remove the 'if' if its condition is always true
if (lang) {
^~~~~~~~~~
libnm-core/nm-utils.c:198:30: note: initialize the variable 'encodings' to silence this warning
const char *const *encodings;
^
= NULL
Fixes: 28a0627481
This commit is contained in:
parent
789f8a6b51
commit
121321542e
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ get_system_encodings (void)
|
|||
{
|
||||
static const char *const *cached_encodings;
|
||||
static char *default_encodings[4];
|
||||
const char *const *encodings;
|
||||
const char *const *encodings = NULL;
|
||||
char *lang;
|
||||
|
||||
if (cached_encodings)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue