Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-bios-setting.c: scope_hint: In function ‘fu_bios_setting_write_value’ fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-bios-setting.c:30:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename(fwupd_bios_setting_get_path(self), "current_value", 0), 1)’ # 28| g_autoptr(FuIOChannel) io = NULL; # 29| # 30|-> fd = open(fn, O_WRONLY); # 31| if (fd < 0) { # 32| g_set_error(error, Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c: scope_hint: In function ‘fu_context_load_hwinfo’ fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:1017: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. /usr/include/json-glib-1.0/json-glib/json-types.h:32: included_from: Included from here. /usr/include/json-glib-1.0/json-glib/json-glib.h:29: included_from: Included from here. fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-bios-settings-private.h:9: included_from: Included from here. fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:982: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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:983: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:651:9: note: in expansion of macro ‘G_LIKELY’ fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:1295:9: note: in expansion of macro ‘g_return_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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.h:17: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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.h:17: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:651:9: note: in expansion of macro ‘G_LIKELY’ fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:1295:9: note: in expansion of macro ‘g_return_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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:424:9: note: in expansion of macro ‘g_return_val_if_fail’ /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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.h:17: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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.h:17: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-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-context.c:424:9: note: in expansion of macro ‘g_return_val_if_fail’ # 1015| /* set the hwid flags */ # 1016| guids = fu_context_get_hwid_guids(self); # 1017|-> for (guint i = 0; i < guids->len; i++) { # 1018| const gchar *guid = g_ptr_array_index(guids, i); # 1019| fu_context_lookup_quirk_by_id_iter(self, Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-efivar-linux.c: scope_hint: In function ‘fu_efivar_set_data_impl’ fwupd-1.9.26-build/fwupd-1.9.26/libfwupdplugin/fu-efivar-linux.c:415:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fu_efivar_get_filename(guid, name), open_wflags)’ # 413| if (attr & FU_EFIVAR_ATTR_APPEND_WRITE) # 414| open_wflags |= O_APPEND; # 415|-> fd = open(fn, open_wflags); # 416| if (fd < 0) { # 417| g_set_error(error,
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-2.0.1-1.fc42 |
diffbase-store-results-to | /tmp/tmpl4ni36ba/fwupd-2.0.1-1.fc42.tar.xz |
diffbase-time-created | 2024-11-13 00:03:01 |
diffbase-time-finished | 2024-11-13 00:14:10 |
diffbase-tool | csmock |
diffbase-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' |
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-1.9.26-1.fc41 |
store-results-to | /tmp/tmpbtake5pm/fwupd-1.9.26-1.fc41.tar.xz |
time-created | 2024-11-12 23:52:02 |
time-finished | 2024-11-13 00:02:49 |
title | Fixed findings |
tool | csmock |
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' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |