Task #131518 - added.err

back to task #131518
download
Error: GCC_ANALYZER_WARNING (CWE-688):
libblockdev-3.5.0/src/plugins/lvm/lvm.c:559:28: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1824:15: enter_function: entry to 'bd_lvm_lvs_tree'
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1836:8: branch_true: following 'true' branch (when 'vg_name' is non-NULL)...
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1837:9: branch_true: ...to here
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1839:16: call_function: calling 'call_lvm_and_parse_json_report' from 'bd_lvm_lvs_tree'
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1839:16: return_function: returning to 'bd_lvm_lvs_tree' from 'call_lvm_and_parse_json_report'
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1840:8: branch_false: following 'false' branch...
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1840:8: branch_false: ...to here
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1851:23: branch_true: following 'true' branch...
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1852:30: branch_true: ...to here
libblockdev-3.5.0/src/plugins/lvm/lvm.c:1853:31: call_function: calling 'get_lv_data_from_json' from 'bd_lvm_lvs_tree'
#  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);

Error: GCC_ANALYZER_WARNING (CWE-688):
libblockdev-3.5.0/src/utils/dev_utils.c:38:9: warning[-Wanalyzer-null-argument]: use of NULL 'path' where non-null expected
libblockdev-3.5.0/src/utils/dev_utils.c:62:8: enter_function: entry to 'bd_utils_resolve_device'
libblockdev-3.5.0/src/utils/dev_utils.c:67:8: branch_false: following 'false' branch (when '_result != 0')...
libblockdev-3.5.0/src/utils/dev_utils.c:70:16: call_function: inlined call to 'g_strdup_inline' from 'bd_utils_resolve_device'
libblockdev-3.5.0/src/utils/dev_utils.c:72:15: release_memory: 'path' is NULL
libblockdev-3.5.0/src/utils/dev_utils.c:73:8: branch_true: following 'true' branch...
libblockdev-3.5.0/src/utils/dev_utils.c:74:13: branch_true: ...to here
libblockdev-3.5.0/src/utils/dev_utils.c:74:12: branch_true: following 'true' branch...
libblockdev-3.5.0/src/utils/dev_utils.c:76:13: branch_true: ...to here
libblockdev-3.5.0/src/utils/dev_utils.c:77:17: call_function: calling '_is_block_device' from 'bd_utils_resolve_device'
#   36|       struct stat sb;
#   37|   
#   38|->     if (stat (path, &sb) != 0) {
#   39|           g_set_error (error, BD_UTILS_DEV_UTILS_ERROR, BD_UTILS_DEV_UTILS_ERROR_FAILED,
#   40|                        "Failed to stat '%s': %s", path, strerror_l (errno, _C_LOCALE));