Error: SHELLCHECK_WARNING (CWE-477): [#def1] /etc/cron.daily/packagekit-background.cron:41:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 39| pkcon $PKCON_OPTIONS $ONLY_DOWNLOAD update &> $PKTMP # 40| PKCON_RETVAL=$? # 41|-> if [ $PKCON_RETVAL -eq 0 -a "$UPDATE_OFFLINE" = "yes" ]; then # 42| pkcon $PKCON_OPTIONS offline-trigger &>> $PKTMP # 43| fi Error: SHELLCHECK_WARNING (CWE-758): [#def2] /etc/profile.d/PackageKit.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> # Copyright (C) 2008 Richard Hughes <richard@hughsie.com> # 2| # # 3| # Licensed under the GNU General Public License Version 2 Error: COMPILER_WARNING (CWE-192): [#def3] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c: scope_hint: In function ‘dnf_emit_package’ PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c:41:22: warning[-Wenum-conversion]: implicit conversion from ‘DnfPackageInfo’ to ‘PkInfoEnum’ # 41 | info = dnf_package_get_info (pkg); # | ^ # 39| /* detect */ # 40| if (info == PK_INFO_ENUM_UNKNOWN) # 41|-> info = dnf_package_get_info (pkg); # 42| if (info == PK_INFO_ENUM_UNKNOWN) # 43| info = dnf_package_installed (pkg) ? PK_INFO_ENUM_INSTALLED : PK_INFO_ENUM_AVAILABLE; Error: COMPILER_WARNING (CWE-192): [#def4] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c: scope_hint: In function ‘dnf_emit_package_list’ PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c:72:38: warning[-Wenum-conversion]: implicit conversion from ‘DnfPackageInfo’ to ‘PkInfoEnum’ # 72 | package_info = dnf_package_get_info (dnf_package); # | ^ # 70| package_info = info; # 71| if (package_info == PK_INFO_ENUM_UNKNOWN) # 72|-> package_info = dnf_package_get_info (dnf_package); # 73| if (package_info == PK_INFO_ENUM_UNKNOWN) # 74| package_info = dnf_package_installed (dnf_package) ? PK_INFO_ENUM_INSTALLED : PK_INFO_ENUM_AVAILABLE; Error: COMPILER_WARNING (CWE-192): [#def5] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c: scope_hint: In function ‘dnf_emit_package_list_filter’ PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c:135:54: warning[-Wenum-conversion]: implicit conversion from ‘enum <anonymous>’ to ‘DnfPackageInfo’ # 135 | dnf_package_set_info (found, PK_INFO_ENUM_BLOCKED); # | ^~~~~~~~~~~~~~~~~~~~ # 133| /* a lower cost package */ # 134| if (dnf_package_get_cost (pkg) < dnf_package_get_cost (found)) { # 135|-> dnf_package_set_info (found, PK_INFO_ENUM_BLOCKED); # 136| g_hash_table_replace (hash_cost, # 137| g_strdup (dnf_package_get_nevra (pkg)), Error: COMPILER_WARNING (CWE-192): [#def6] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c:140:52: warning[-Wenum-conversion]: implicit conversion from ‘enum <anonymous>’ to ‘DnfPackageInfo’ # 140 | dnf_package_set_info (pkg, PK_INFO_ENUM_BLOCKED); # | ^~~~~~~~~~~~~~~~~~~~ # 138| (gpointer) pkg); # 139| } else { # 140|-> dnf_package_set_info (pkg, PK_INFO_ENUM_BLOCKED); # 141| } # 142| } Error: COMPILER_WARNING (CWE-192): [#def7] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/dnf-backend.c:166:44: warning[-Wenum-conversion]: implicit conversion from ‘enum <anonymous>’ to ‘DnfPackageInfo’ # 166 | dnf_package_set_info (pkg, PK_INFO_ENUM_UNAVAILABLE); # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 164| if (dnf_repo_get_enabled (repo) != DNF_REPO_ENABLED_METADATA) # 165| continue; # 166|-> dnf_package_set_info (pkg, PK_INFO_ENUM_UNAVAILABLE); # 167| } # 168| Error: COMPILER_WARNING (CWE-192): [#def8] /usr/include/glib-2.0/glib.h:64: included_from: Included from here. /usr/include/glib-2.0/gmodule.h:30: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c:24: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c: scope_hint: In function ‘pk_backend_state_action_changed_cb’ PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c:319:52: warning[-Wenum-conversion]: implicit conversion from ‘DnfStateAction’ to ‘PkStatusEnum’ # 319 | pk_status_enum_to_string (action), # | ^~~~~~ /usr/include/glib-2.0/glib/gmessages.h:370:32: note: in definition of macro ‘g_debug’ # 370 | __VA_ARGS__) # | ^~~~~~~~~~~ # 317| if (action != DNF_STATE_ACTION_UNKNOWN) { # 318| g_debug ("got state %s with hint %s", # 319|-> pk_status_enum_to_string (action), # 320| action_hint); # 321| pk_backend_job_set_status (job, action); Error: COMPILER_WARNING (CWE-192): [#def9] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c:321:49: warning[-Wenum-conversion]: implicit conversion from ‘DnfStateAction’ to ‘PkStatusEnum’ # 321 | pk_backend_job_set_status (job, action); # | ^~~~~~ # 319| pk_status_enum_to_string (action), # 320| action_hint); # 321|-> pk_backend_job_set_status (job, action); # 322| } # 323| Error: COMPILER_WARNING (CWE-192): [#def10] PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c: scope_hint: In function ‘pk_backend_search_thread’ PackageKit-1.2.8-build/PackageKit-1.2.8/backends/dnf/pk-backend-dnf.c:1102:60: warning[-Wenum-conversion]: implicit conversion from ‘PkInfoEnum’ to ‘DnfPackageInfo’ # 1102 | dnf_package_set_info (pkg, info_enum); # | ^~~~~~~~~ # 1100| #endif # 1101| info_enum = dnf_advisory_kind_to_info_enum (kind); # 1102|-> dnf_package_set_info (pkg, info_enum); # 1103| } # 1104| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c: scope_hint: In function ‘pk_console_depends_on’ PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c:1245:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’ /usr/include/glib-2.0/gobject/gobject.h:30: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/glib-object.h:24: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-category.h:29: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/packagekit.h:27: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c:30: included_from: Included from here. /usr/include/glib-2.0/gobject/gsignal.h:519:29: note: in definition of macro ‘g_signal_connect’ /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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ /usr/include/glib-2.0/glib/glib-autocleanups.h: scope_hint: In function ‘pk_console_depends_on’ /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:56: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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ # 1243| package_ids = pk_console_resolve_packages (ctx, packages, &error_local); # 1244| if (package_ids == NULL) { # 1245|-> g_set_error (error, # 1246| PK_CONSOLE_ERROR, # 1247| PK_ERROR_ENUM_INTERNAL_ERROR, Error: GCC_ANALYZER_WARNING (CWE-476): [#def12] PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c: scope_hint: In function ‘pk_console_get_details’ PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c:1284:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’ /usr/include/glib-2.0/gobject/gsignal.h:519:29: note: in definition of macro ‘g_signal_connect’ /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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ /usr/include/glib-2.0/glib/glib-autocleanups.h: scope_hint: In function ‘pk_console_get_details’ /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:56: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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ # 1282| package_ids = pk_console_resolve_packages (ctx, packages, &error_local); # 1283| if (package_ids == NULL) { # 1284|-> g_set_error (error, # 1285| PK_CONSOLE_ERROR, # 1286| PK_ERROR_ENUM_INTERNAL_ERROR, Error: GCC_ANALYZER_WARNING (CWE-476): [#def13] PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c: scope_hint: In function ‘pk_console_get_files’ PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c:1343:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’ /usr/include/glib-2.0/gobject/gsignal.h:519:29: note: in definition of macro ‘g_signal_connect’ /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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ /usr/include/glib-2.0/glib/glib-autocleanups.h: scope_hint: In function ‘pk_console_get_files’ /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:56: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:56:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ # 1341| package_ids = pk_console_resolve_packages (ctx, packages, &error_local); # 1342| if (package_ids == NULL) { # 1343|-> g_set_error (error, # 1344| PK_CONSOLE_ERROR, # 1345| PK_ERROR_ENUM_INTERNAL_ERROR, Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c: scope_hint: In function ‘pk_console_get_update_detail’ PackageKit-1.2.8-build/PackageKit-1.2.8/client/pk-console.c:1371:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’ # 1369| package_ids = pk_console_resolve_packages (ctx, packages, &error_local); # 1370| if (package_ids == NULL) { # 1371|-> g_set_error (error, # 1372| PK_CONSOLE_ERROR, # 1373| PK_ERROR_ENUM_INTERNAL_ERROR, Error: GCC_ANALYZER_WARNING (CWE-476): [#def15] PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_swizzle’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:75:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ /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/gi18n.h:23: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:30: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:74:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_swizzle’ # 73| for (i = 0; i < len-1; i++) { # 74| possible = g_strdup (cmd); # 75|-> swap = possible[i]; # 76| possible[i] = possible[i+1]; # 77| possible[i+1] = swap; Error: GCC_ANALYZER_WARNING (CWE-476): [#def16] PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:75:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘shell_to_free’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:74:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_swizzle’ # 73| for (i = 0; i < len-1; i++) { # 74| possible = g_strdup (cmd); # 75|-> swap = possible[i]; # 76| possible[i] = possible[i+1]; # 77| possible[i+1] = swap; Error: GCC_ANALYZER_WARNING (CWE-476): [#def17] PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_replace’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:95:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cmd’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:74:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_replace’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:74:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_replace’ # 93| /* replace some easily confused chars */ # 94| for (i = 0; i < len; i++) { # 95|-> temp = cmd[i]; # 96| if (temp == 'i') { # 97| possible = g_strdup (cmd); Error: GCC_ANALYZER_WARNING (CWE-688): [#def18] PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:315:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:312:20: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_case’ /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 313| for (i = 0; i < len; i++) # 314| possible[i] = g_ascii_tolower (cmd[i]); # 315|-> if (strcmp (possible, cmd) != 0) # 316| g_ptr_array_add (array, possible); # 317| else Error: GCC_ANALYZER_WARNING (CWE-688): [#def19] PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_case’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:315:13: warning[-Wanalyzer-null-argument]: use of NULL ‘cmd’ where non-null expected PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:312:20: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c: scope_hint: In function ‘pk_cnf_find_alternatives_case’ PackageKit-1.2.8-build/PackageKit-1.2.8/contrib/command-not-found/pk-command-not-found.c:24: included_from: Included from here. /usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null # 313| for (i = 0; i < len; i++) # 314| possible[i] = g_ascii_tolower (cmd[i]); # 315|-> if (strcmp (possible, cmd) != 0) # 316| g_ptr_array_add (array, possible); # 317| else Error: GCC_ANALYZER_WARNING (CWE-476): [#def20] PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package-id.c: scope_hint: In function ‘pk_package_id_equal_fuzzy_arch’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package-id.c:171:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 169| sections1 = pk_package_id_split (package_id1); # 170| sections2 = pk_package_id_split (package_id2); # 171|-> if (g_strcmp0 (sections1[0], sections2[0]) == 0 && # 172| g_strcmp0 (sections1[1], sections2[1]) == 0 && # 173| pk_package_id_equal_fuzzy_arch_section (sections1[2], sections2[2])) Error: GCC_ANALYZER_WARNING (CWE-476): [#def21] PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c: scope_hint: In function ‘pk_package_set_id’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:182:42: 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. PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:33: 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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:171:9: note: in expansion of macro ‘g_return_val_if_fail’ /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. PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:179:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c: scope_hint: In function ‘pk_package_set_id’ # 180| priv->package_id_data = g_strdup (package_id); # 181| priv->package_id_split[0] = priv->package_id_data; # 182|-> for (i = 0; priv->package_id_data[i] != '\0'; i++) { # 183| if (package_id[i] == ';') { # 184| if (++cnt > 3) Error: GCC_ANALYZER_WARNING (CWE-476): [#def22] PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:183:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘package_id’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:223:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.h:39:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:223:31: note: in expansion of macro ‘PK_IS_PACKAGE’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:223:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.h:39:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:223:31: note: in expansion of macro ‘PK_IS_PACKAGE’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:170: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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:171: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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:171:9: note: in expansion of macro ‘g_return_val_if_fail’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c:179:28: note: in expansion of macro ‘g_strdup’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-package.c: scope_hint: In function ‘pk_package_set_id’ # 181| priv->package_id_split[0] = priv->package_id_data; # 182| for (i = 0; priv->package_id_data[i] != '\0'; i++) { # 183|-> if (package_id[i] == ';') { # 184| if (++cnt > 3) # 185| continue; Error: GCC_ANALYZER_WARNING (CWE-775): [#def23] PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c: scope_hint: In function ‘fork_agent’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:111:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/tty", 1)’ /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. PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:37: 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’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:57: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/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:58:9: note: in expansion of macro ‘g_assert’ /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/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:58:9: note: in expansion of macro ‘g_assert’ # 109| dup2(fd, STDERR_FILENO); # 110| # 111|-> if (fd > 2) # 112| close(fd); # 113| } Error: GCC_ANALYZER_WARNING (CWE-1341): [#def24] PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c: scope_hint: In function ‘close_nointr’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:141:21: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’ /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/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:136:9: note: in expansion of macro ‘g_assert’ PackageKit-1.2.8-build/PackageKit-1.2.8/lib/packagekit-glib2/pk-spawn-polkit-agent.c:33: included_from: Included from here. # 139| int r; # 140| # 141|-> r = close (fd); # 142| if (r >= 0) # 143| return r; Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c: scope_hint: In function ‘pk_engine_daemon_method_call’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1342:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ /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/glib/gi18n.h:23: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:38: 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:651:9: note: in expansion of macro ‘G_LIKELY’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1307:9: note: in expansion of macro ‘g_return_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.h:36:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1307:27: note: in expansion of macro ‘PK_IS_ENGINE’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1307:9: note: in expansion of macro ‘g_return_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.h:36:34: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1307:27: note: in expansion of macro ‘PK_IS_ENGINE’ /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:651:9: note: in expansion of macro ‘G_LIKELY’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c:1308:9: note: in expansion of macro ‘g_return_if_fail’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c: scope_hint: In function ‘pk_engine_daemon_method_call’ /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:61: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:61:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c: scope_hint: In function ‘pk_engine_daemon_method_call’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-engine.c: scope_hint: In function ‘pk_engine_daemon_method_call’ # 1340| value = pk_engine_get_package_history (engine, package_names, size, &error); # 1341| if (value == NULL) { # 1342|-> g_dbus_method_invocation_return_error (invocation, # 1343| PK_ENGINE_ERROR, # 1344| PK_ENGINE_ERROR_NOT_SUPPORTED, Error: GCC_ANALYZER_WARNING (CWE-457): [#def26] PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-main.c: scope_hint: In function ‘main’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-main.c:275:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘helper.timer_id’ # 273| #endif # 274| # 275|-> if (helper.timer_id > 0) # 276| g_source_remove (helper.timer_id); # 277| if (loop != NULL) Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c: scope_hint: In function ‘pk_scheduler_get_exclusive_running’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:356:18: 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/glib/gi18n.h:23: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:62: 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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:352:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:352:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:352:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:352:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:352: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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /usr/include/glib-2.0/glib.h:64: included_from: Included from here. PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ # 354| /* anything running? */ # 355| array = pk_scheduler_get_active_transactions (scheduler); # 356|-> if (array->len == 0) # 357| return 0; # 358| Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c: scope_hint: In function ‘pk_scheduler_get_locked’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:725:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:720:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:720:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:720:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:720:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:721: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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ # 723| /* check if any backend in running transaction is locked at time */ # 724| array = pk_scheduler_get_active_transactions (scheduler); # 725|-> for (i = 0; i < array->len; i++) { # 726| item = g_ptr_array_index (array, i); # 727| job = pk_transaction_get_backend_job (item->transaction); Error: GCC_ANALYZER_WARNING (CWE-476): [#def29] PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c: scope_hint: In function ‘pk_scheduler_get_inhibited’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:755:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:750:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:750:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:750:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:750:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ /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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:751: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’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.h:35:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:31: note: in expansion of macro ‘PK_IS_SCHEDULER’ PackageKit-1.2.8-build/PackageKit-1.2.8/src/pk-scheduler.c:322:9: note: in expansion of macro ‘g_return_val_if_fail’ # 753| /* check if any backend in running transaction is locked at time */ # 754| array = pk_scheduler_get_active_transactions (scheduler); # 755|-> for (i = 0; i < array->len; i++) { # 756| item = g_ptr_array_index (array, i); # 757| job = pk_transaction_get_backend_job (item->transaction);
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 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-14.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | PackageKit-1.2.8-8.fc42 |
store-results-to | /tmp/tmp8z8kc75j/PackageKit-1.2.8-8.fc42.tar.xz |
time-created | 2024-11-12 23:12:03 |
time-finished | 2024-11-12 23:15:00 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp8z8kc75j/PackageKit-1.2.8-8.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp8z8kc75j/PackageKit-1.2.8-8.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |