libnm-glib-aux: fix gcc warning maybe-uninitialized

This is breaking compilation when using LTO.

```
src/libnm-glib-aux/nm-uuid.c: In function 'nm_uuid_generate_from_strings_strv':
src/libnm-glib-aux/nm-uuid.c:490:12: error: '_1' may be used uninitialized [-Werror=maybe-uninitialized]
  490 |     return nm_uuid_generate_from_string_str(s, slen, uuid_type, type_args);
      |            ^
src/libnm-glib-aux/nm-uuid.c:392:1: note: by argument 1 of type 'const char *' to 'nm_uuid_generate_from_string_str' declared here
  392 | nm_uuid_generate_from_string_str(const char   *s,
      | ^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
```
This commit is contained in:
Fernando Fernandez Mancera 2024-05-15 11:48:08 +02:00
parent 2a88ef4d30
commit 2b6145cc8f

View file

@ -433,7 +433,7 @@ nm_uuid_generate_from_strings_strv(NMUuidType uuid_type,
{
nm_auto_str_buf NMStrBuf str = NM_STR_BUF_INIT_A(NM_UTILS_GET_NEXT_REALLOC_SIZE_232, TRUE);
gsize slen;
const char *s;
const char *s = NULL;
if (len > 0) {
gboolean has_nulls = FALSE;