fwupd-2.0.1-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c: scope_hint: In function ‘fu_backend_from_json’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:443:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/json-glib-1.0/json-glib/json-glib.h:29: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend-private.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:11: included_from: Included from here.
/usr/include/json-glib-1.0/json-glib/json-types.h:74:42: note: in expansion of macro ‘JSON_NODE_HOLDS’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:358:14: note: in expansion of macro ‘JSON_NODE_HOLDS_OBJECT’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/json-glib-1.0/json-glib/json-types.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:630:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:1719:40: note: in definition of macro ‘G_DECLARE_DERIVABLE_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:630:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:630:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.c:630:9: note: in expansion of macro ‘g_return_val_if_fail’
#  441|   
#  442|   	/* emit removes then adds */
#  443|-> 	for (guint i = 0; i < devices_remove->len; i++) {
#  444|   		FuDevice *device = g_ptr_array_index(devices_remove, i);
#  445|   		if (!fu_device_has_flag(device, FWUPD_DEVICE_FLAG_EMULATED))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-linux-efivars.c: scope_hint: In function ‘fu_linux_efivars_set_data’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-linux-efivars.c:451:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fu_linux_efivars_get_filename(guid,  name), open_wflags)’
#  449|   	if (attr & FU_EFIVARS_ATTR_APPEND_WRITE)
#  450|   		open_wflags |= O_APPEND;
#  451|-> 	fd = open(fn, open_wflags);
#  452|   	if (fd < 0) {
#  453|   		g_set_error(error,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c: scope_hint: In function ‘fu_security_attrs_add_json’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c:502:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd-bios-setting.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c:11: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c:193:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c:193:9: note: in expansion of macro ‘g_return_val_if_fail’
#  500|   	json_builder_begin_array(builder);
#  501|   	items = fu_security_attrs_get_all(self);
#  502|-> 	for (guint i = 0; i < items->len; i++) {
#  503|   		FwupdSecurityAttr *attr = g_ptr_array_index(items, i);
#  504|   		guint64 created = fwupd_security_attr_get_created(attr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c: scope_hint: In function ‘fu_security_attrs_equal’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c:673:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/glib-2.0/glib/gmacros.h:1365:7: note: in expansion of macro ‘_GLIB_AUTOPTR_CLEAR_FUNC_NAME’
/usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’
/usr/include/glib-2.0/glib/glib-autocleanups.h:63:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’
/usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’
/usr/include/glib-2.0/glib/glib-autocleanups.h:63:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c: scope_hint: In function ‘fu_security_attrs_equal’
/usr/include/glib-2.0/glib/gmacros.h:1365:7: note: in expansion of macro ‘_GLIB_AUTOPTR_CLEAR_FUNC_NAME’
/usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’
/usr/include/glib-2.0/glib/glib-autocleanups.h:57:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’
/usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’
/usr/include/glib-2.0/glib/glib-autocleanups.h:57:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-security-attrs.c: scope_hint: In function ‘fu_security_attrs_equal’
#  671|   {
#  672|   	g_autoptr(GPtrArray) compare = fu_security_attrs_compare(attrs1, attrs2);
#  673|-> 	return compare->len == 0;
#  674|   }
#  675|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/bcm57xx/fu-bcm57xx-recovery-device.c: scope_hint: In function ‘fu_bcm57xx_recovery_device_open’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/bcm57xx/fu-bcm57xx-recovery-device.c:764:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(fu_udev_device_get_sysfs_path(device), g_strdup_printf("resource%u", i * 2), 0), 1052674)’
#  762|   		resfn = g_strdup_printf("resource%u", i * 2);
#  763|   		fn = g_build_filename(sysfs_path, resfn, NULL);
#  764|-> 		memfd = open(fn, O_RDWR | O_SYNC);
#  765|   		if (memfd < 0) {
#  766|   			g_set_error(error,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c: scope_hint: In function ‘fu_nvme_device_parse_cns’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:276:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-common.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:12: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:48:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:48:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:48:9: note: in expansion of macro ‘g_return_val_if_fail’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/nvme/fu-nvme-device.c:48:9: note: in expansion of macro ‘g_return_val_if_fail’
#  274|   
#  275|   	/* firmware update granularity (FWUG) */
#  276|-> 	fwug = buf[319];
#  277|   	if (fwug != 0x00 && fwug != 0xff)
#  278|   		self->write_block_size = ((guint64)fwug) * 0x1000;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/synaptics-mst/fu-synaptics-mst-device.c: scope_hint: In function ‘fu_synaptics_mst_device_ensure_board_id’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/synaptics-mst/fu-synaptics-mst-device.c:1526:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
# 1524|   			return FALSE;
# 1525|   		}
# 1526|-> 		fd = open(filename, O_RDONLY);
# 1527|   		if (fd == -1) {
# 1528|   			g_set_error(error,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/synaptics-mst/fu-synaptics-mst-device.c:1535:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
# 1533|   			return FALSE;
# 1534|   		}
# 1535|-> 		if (read(fd, buf, 2) != 2) {
# 1536|   			g_set_error(error,
# 1537|   				    FWUPD_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/synaptics-mst/fu-synaptics-mst-device.c:1536:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
# 1534|   		}
# 1535|   		if (read(fd, buf, 2) != 2) {
# 1536|-> 			g_set_error(error,
# 1537|   				    FWUPD_ERROR,
# 1538|   				    FWUPD_ERROR_INVALID_DATA,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/synaptics-mst/fu-synaptics-mst-device.c:1544:34: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("%s/remote/%s_eeprom", g_path_get_dirname(fu_udev_device_get_device_file(self)), fu_device_get_logical_id(self)), 0)’
# 1542|   			return FALSE;
# 1543|   		}
# 1544|-> 		self->board_id = fu_memread_uint16(buf, G_BIG_ENDIAN);
# 1545|   		close(fd);
# 1546|   		return TRUE;

Error: COMPILER_WARNING (CWE-477): [#def11]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/uefi-capsule/fu-uefi-backend-linux.c: scope_hint: In function ‘fu_uefi_backend_linux_check_efivarfs’
fwupd-2.0.1-build/fwupd-2.0.1/plugins/uefi-capsule/fu-uefi-backend-linux.c:89:9: warning[-Wdeprecated-declarations]: ‘g_unix_mount_at’ is deprecated: Use 'g_unix_mount_entry_at' instead
#   89 |         g_autoptr(GUnixMountEntry) mount = g_unix_mount_at(sysfsefivardir, NULL);
#      |         ^~~~~~~~~
fwupd-2.0.1-build/fwupd-2.0.1/plugins/uefi-capsule/fu-uefi-backend-linux.c:9: included_from: Included from here.
/usr/include/gio-unix-2.0/gio/gunixmounts.h:206:18: note: declared here
#  206 | GUnixMountEntry *g_unix_mount_at                    (const char         *mount_path,
#      |                  ^~~~~~~~~~~~~~~
#   87|   	g_autofree gchar *sysfsfwdir = fu_path_from_kind(FU_PATH_KIND_SYSFSDIR_FW);
#   88|   	g_autofree gchar *sysfsefivardir = g_build_filename(sysfsfwdir, "efi", "efivars", NULL);
#   89|-> 	g_autoptr(GUnixMountEntry) mount = g_unix_mount_at(sysfsefivardir, NULL);
#   90|   
#   91|   	/* in the self tests */

Error: COMPILER_WARNING (CWE-477): [#def12]
fwupd-2.0.1-build/fwupd-2.0.1/plugins/uefi-capsule/fu-uefi-backend-linux.c:103:9: warning[-Wdeprecated-declarations]: ‘g_unix_mount_is_readonly’ is deprecated: Use 'g_unix_mount_entry_is_readonly' instead
#  103 |         if (g_unix_mount_is_readonly(mount)) {
#      |         ^~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:118:16: note: declared here
#  118 | gboolean       g_unix_mount_is_readonly             (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~
#  101|   		return FALSE;
#  102|   	}
#  103|-> 	if (g_unix_mount_is_readonly(mount)) {
#  104|   		GType gtype = fu_uefi_backend_get_device_gtype(FU_UEFI_BACKEND(self));
#  105|   		if (gtype != FU_TYPE_UEFI_COD_DEVICE) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-console.c: scope_hint: In function ‘fu_console_box’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-console.c:298:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-console.c: scope_hint: In function ‘fu_console_box’
/usr/include/glib-2.0/glib/glib-autocleanups.h:103:1: note: in expansion of macro ‘G_DEFINE_AUTO_CLEANUP_FREE_FUNC’
#  296|   	if (title != NULL) {
#  297|   		g_autoptr(GPtrArray) lines = fu_console_strsplit_words(title, width - 4);
#  298|-> 		for (guint j = 0; j < lines->len; j++) {
#  299|   			const gchar *line = g_ptr_array_index(lines, j);
#  300|   			fu_console_box_line("║ ", line, " ║", " ", width);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c: scope_hint: In function ‘fu_polkit_agent_fork_agent’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:92:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 1)’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:45:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:46:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:46:9: note: in expansion of macro ‘g_return_val_if_fail’
#   90|   		if (!stderr_is_tty)
#   91|   			dup2(fd, STDERR_FILENO);
#   92|-> 		if (fd > 2)
#   93|   			close(fd);
#   94|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c: scope_hint: In function ‘fu_polkit_agent_open’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:230:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fd[0]’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd-bios-setting.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fwupdplugin.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:16: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:45:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:46:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:46:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:118:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:118:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:118:9: note: in expansion of macro ‘g_return_val_if_fail’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-polkit-agent.c:118:9: note: in expansion of macro ‘g_return_val_if_fail’
#  228|   	fu_polkit_agent_close_nointr_nofail(pipe_fd[0]);
#  229|   	return TRUE;
#  230|-> }
#  231|   
#  232|   void

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c: scope_hint: In function ‘fu_release_compare’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:1290:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
/usr/include/libxmlb-2/libxmlb/xb-compile.h:9: included_from: Included from here.
/usr/include/libxmlb-2/libxmlb/xb-builder-node.h:9: included_from: Included from here.
/usr/include/libxmlb-2/libxmlb/xb-builder-fixup.h:9: included_from: Included from here.
/usr/include/libxmlb-2/xmlb.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-device-private.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:11: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:155:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:1613:40: note: in definition of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1614:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.h:16:1: note: in expansion of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1614:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.h:16:1: note: in expansion of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:155:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:155:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:155:9: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/gobject/gtype.h:1613:40: note: in definition of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1614:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.h:16:1: note: in expansion of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’
/usr/include/glib-2.0/gobject/gtype.h:1614:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.h:16:1: note: in expansion of macro ‘G_DECLARE_FINAL_TYPE’
/usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
fwupd-2.0.1-build/fwupd-2.0.1/src/fu-release.c:155:9: note: in expansion of macro ‘g_return_val_if_fail’
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd-client.h:12: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd-client-sync.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd.h:13: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-input-stream.h:9: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/redhat-linux-build/libfwupdplugin/fu-common-struct.h:3: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-context.h:12: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-backend.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupdplugin/fu-device-private.h:11: included_from: Included from here.
fwupd-2.0.1-build/fwupd-2.0.1/libfwupd/fwupd-device.h:108:1: note: argument 1 of ‘fwupd_device_get_version_format’ must be non-null
# 1288|   
# 1289|   	/* FWUPD_DEVICE_FLAG_INSTALL_ALL_RELEASES has to be from oldest to newest */
# 1290|-> 	return fu_version_compare(fu_release_get_version(release1),
# 1291|   				  fu_release_get_version(release2),
# 1292|   				  fu_device_get_version_format(device1));

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-116.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namefwupd-2.0.1-1.fc42
store-results-to/tmp/tmpl4ni36ba/fwupd-2.0.1-1.fc42.tar.xz
time-created2024-11-13 00:03:01
time-finished2024-11-13 00:14:10
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpl4ni36ba/fwupd-2.0.1-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpl4ni36ba/fwupd-2.0.1-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9