Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse.c: quiet "may be used uninitialized" warnings/errors
gcc complains about ip_str not being initialized before the cleanup function is called: In file included from /usr/include/glib-2.0/glib.h:117, from ../src/parse.c:25: In function ‘g_autoptr_cleanup_generic_gfree’, inlined from ‘get_ip_family’ at ../src/parse.c:1912:22: /usr/include/glib-2.0/glib/glib-autocleanups.h:32:3: error: ‘ip_str’ may be used uninitialized [-Werror=maybe-uninitialized] 32 | g_free (*pp); | ^~~~~~~~~~~~ ../src/parse.c: In function ‘get_ip_family’: ../src/parse.c:1912:22: note: ‘ip_str’ was declared here 1912 | g_autofree char *ip_str; | ^~~~~~ cc1: all warnings being treated as errors Let's initialize it to NULL to satisfy the compiler.
- Loading branch information