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-775): [#def3] 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): [#def4] 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));
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-116.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | fwupd-1.9.26-1.fc41 |
diffbase-store-results-to | /tmp/tmpbtake5pm/fwupd-1.9.26-1.fc41.tar.xz |
diffbase-time-created | 2024-11-12 23:52:02 |
diffbase-time-finished | 2024-11-13 00:02:49 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpbtake5pm/fwupd-1.9.26-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpbtake5pm/fwupd-1.9.26-1.fc41.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-116.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | fwupd-2.0.1-1.fc42 |
store-results-to | /tmp/tmpl4ni36ba/fwupd-2.0.1-1.fc42.tar.xz |
time-created | 2024-11-13 00:03:01 |
time-finished | 2024-11-13 00:14:10 |
title | Newly introduced findings |
tool | csmock |
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-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |