Skip to content

main: Fix GCC warning

Bastien Nocera requested to merge wip/hadess/uninit-var into master
In file included from /usr/include/glib-2.0/glib.h:114,
                 from ../src/info-cleanup.c:21:
In function ‘g_autoptr_cleanup_generic_gfree’,
    inlined from ‘info_cleanup’ at ../src/info-cleanup.c:123:20:
/usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: warning: ‘pretty’ may be used uninitialized [-Wmaybe-uninitialized]
   28 |   g_free (*pp);
      |   ^~~~~~~~~~~~
../src/info-cleanup.c: In function ‘info_cleanup’:
../src/info-cleanup.c:123:20: note: ‘pretty’ was declared here
  123 |   g_autofree char *pretty;
      |                    ^~~~~~

Merge request reports

Loading