Task #105230 - added.err

back to task #105230
download
Error: GCC_ANALYZER_WARNING (CWE-688):
libblockdev-3.4.0/src/plugins/lvm/lvm.c: scope_hint: In function 'get_lv_data_from_json'
libblockdev-3.4.0/src/plugins/lvm/lvm.c:559:28: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/glist.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/ghash.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
libblockdev-3.4.0/src/plugins/lvm/lvm.c:20: included_from: Included from here.
libblockdev-3.4.0/src/plugins/lvm/lvm.c:328:5: note: in expansion of macro 'g_free'
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:162:36: note: in definition of macro 'g_str_has_prefix'
/usr/include/glib-2.0/glib/gmem.h:335:57: note: in expansion of macro '_G_NEW'
libblockdev-3.4.0/src/plugins/lvm/lvm.c:554:26: note: in expansion of macro 'g_new0'
libblockdev-3.4.0/src/plugins/lvm/lvm.c:558:26: note: in expansion of macro 'g_strdup'
libblockdev-3.4.0/src/plugins/lvm/lvm.c: scope_hint: In function 'get_lv_data_from_json'
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:292:14: note: argument 1 of 'strrchr' must be non-null
#  557|   
#  558|               gchar *dev = g_strdup (json_array_get_string_element (array, 0));
#  559|->             gchar *paren = strrchr (dev, '(');
#  560|               if (paren) {
#  561|                   data->segs[0]->pv_start_pe = g_ascii_strtoull (paren + 1, NULL, 10);