Task #60 - glib2-2.80.0-1.fc41/scan-results.err
back to task #60download
Error: SHELLCHECK_WARNING (CWE-456): /usr/bin/glib-gettextize:29:1: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string). # 27| # further information how to use it consult the GNU gettext manual. # 28| # 29|-> echo=echo # 30| progname=$0 # 31| force=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/bin/glib-gettextize:49:5: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 47| case `uname` in # 48| MINGW32*) # 49|-> prefix="`dirname $0`/.." # 50| ;; # 51| esac Error: SHELLCHECK_WARNING (CWE-563): /usr/bin/glib-gettextize:53:1: warning[SC2034]: datarootdir appears unused. Verify use (or export if used externally). # 51| esac # 52| # 53|-> datarootdir=/usr/share # 54| datadir=/usr/share # 55| Error: SHELLCHECK_WARNING (CWE-563): /usr/bin/glib-gettextize:68:7: warning[SC2034]: configstatus appears unused. Verify use (or export if used externally). # 66| -r | --run | --r* ) # 67| shift # 68|-> configstatus=1 ;; # 69| --help | --h* ) # 70| $echo "$usage"; exit 0 ;; Error: SHELLCHECK_WARNING (CWE-252): /usr/bin/glib-gettextize:164:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 162| # 163| # Copy files to po/ subdirectory. # 164|-> cd po # 165| for file in *; do # 166| rm -f "$srcdir/po/$file" Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gapplication.c: scope_hint: In function ‘g_application_real_local_command_line’ glib-2.80.0/gio/gapplication.c:1126:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gapplication.h:29: included_from: Included from here. glib-2.80.0/gio/gapplication.c:25: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:500:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/gio/gapplication.c:500:3: note: in expansion of macro ‘g_return_val_if_fail’ # 1124| if (!options) # 1125| { # 1126|-> g_printerr ("%s\n", error->message); # 1127| g_error_free (error); # 1128| *exit_status = 1; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gapplication.c: scope_hint: In function ‘g_application_run’ glib-2.80.0/gio/gapplication.c:2688:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2597:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gapplication.h:38:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gapplication.c:2597:25: note: in expansion of macro ‘G_IS_APPLICATION’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2597:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gapplication.h:38:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gapplication.c:2597:25: note: in expansion of macro ‘G_IS_APPLICATION’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2598:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2599:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2599:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/glist.h:34: included_from: Included from here. glib-2.80.0/glib/ghash.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:52: included_from: Included from here. glib-2.80.0/glib/gmem.h:261:32: note: in definition of macro ‘_G_NEW’ glib-2.80.0/gio/gapplication.c:2656:17: note: in expansion of macro ‘g_new’ glib-2.80.0/gobject/gobject.h:26: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:31: included_from: Included from here. glib-2.80.0/gobject/gtype.h:571:66: note: in expansion of macro ‘_G_TYPE_IGC’ glib-2.80.0/gio/gapplication.h:40:62: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_CLASS’ glib-2.80.0/gio/gapplication.c:2681:8: note: in expansion of macro ‘G_APPLICATION_GET_CLASS’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2328:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gapplication.h:38:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gapplication.c:2328:25: note: in expansion of macro ‘G_IS_APPLICATION’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gapplication.c:2328:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gapplication.h:38:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gapplication.c:2328:25: note: in expansion of macro ‘G_IS_APPLICATION’ # 2686| if (!g_application_register (application, NULL, &error)) # 2687| { # 2688|-> g_printerr ("Failed to register: %s\n", error->message); # 2689| g_error_free (error); # 2690| return 1; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gdbusauthmechanismsha1.c: scope_hint: In function ‘mechanism_server_data_send’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1111:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gprintf.h:23: included_from: Included from here. glib-2.80.0/glib/gstdio.h:24: included_from: Included from here. glib-2.80.0/gio/gdbusauthmechanismsha1.c:30: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1093:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusauthmechanismsha1.h:39:50: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1093:25: note: in expansion of macro ‘G_IS_DBUS_AUTH_MECHANISM_SHA1’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1093:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusauthmechanismsha1.h:39:50: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1093:25: note: in expansion of macro ‘G_IS_DBUS_AUTH_MECHANISM_SHA1’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1093:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1094:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1094:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1095:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1095:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:702:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:703:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:703:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:704:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:705:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:705:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:705:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:705:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:283:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:283:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:283:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:283:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:921:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:921:3: note: in expansion of macro ‘g_assert’ # 1109| { # 1110| g_free (m->priv->reject_reason); # 1111|-> m->priv->reject_reason = g_strdup_printf ("Error adding entry to keyring: %s", error->message); # 1112| g_error_free (error); # 1113| m->priv->state = G_DBUS_AUTH_MECHANISM_STATE_REJECTED; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gdbusauthmechanismsha1.c: scope_hint: In function ‘mechanism_client_data_receive’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1250:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1217:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusauthmechanismsha1.h:39:50: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1217:21: note: in expansion of macro ‘G_IS_DBUS_AUTH_MECHANISM_SHA1’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1217:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusauthmechanismsha1.h:39:50: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1217:21: note: in expansion of macro ‘G_IS_DBUS_AUTH_MECHANISM_SHA1’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1218:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1219:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:1219:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusauthmechanismsha1.c:391:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/gio/gdbusauthmechanismsha1.c:391:3: note: in expansion of macro ‘g_return_val_if_fail’ # 1248| { # 1249| g_free (m->priv->reject_reason); # 1250|-> m->priv->reject_reason = g_strdup_printf ("Problems looking up entry in keyring: %s", error->message); # 1251| g_error_free (error); # 1252| m->priv->state = G_DBUS_AUTH_MECHANISM_STATE_REJECTED; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gdbusconnection.c: scope_hint: In function ‘g_dbus_connection_call_sync_internal’ glib-2.80.0/gio/gdbusconnection.c:6146:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘local_error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gdbusauth.h:30: included_from: Included from here. glib-2.80.0/gio/gdbusconnection.c:100: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6067:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusconnection.h:36:41: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusconnection.c:6067:25: note: in expansion of macro ‘G_IS_DBUS_CONNECTION’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6067:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusconnection.h:36:41: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusconnection.c:6067:25: note: in expansion of macro ‘G_IS_DBUS_CONNECTION’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6069:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6070:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6070:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6071:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6071:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6072:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6072:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6073:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6075:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:6079:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/gio/gdbusconnection.c:6100:7: note: in expansion of macro ‘G_UNLIKELY’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:2132:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusconnection.h:36:41: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusconnection.c:2132:25: note: in expansion of macro ‘G_IS_DBUS_CONNECTION’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusconnection.c:2132:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusconnection.h:36:41: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusconnection.c:2132:25: note: in expansion of macro ‘G_IS_DBUS_CONNECTION’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/gio/gdbusconnection.c:6131:7: note: in expansion of macro ‘G_UNLIKELY’ # 6144| else # 6145| { # 6146|-> g_print ("FAILED: %s\n", # 6147| local_error->message); # 6148| } Error: CLANG_WARNING: glib-2.80.0/gio/gdbusdaemon.c:904:7: warning[unix.Malloc]: Use of memory after it is freed # 902| } # 903| # 904|-> name_unqueue_owner (name, client); # 905| # 906| name_unref (name); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gdbusinterfaceskeleton.c: scope_hint: In function ‘skeleton_intercept_handle_method_call’ glib-2.80.0/gio/gdbusinterfaceskeleton.c:660:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 658| { # 659| GDBusInterfaceSkeleton *interface = G_DBUS_INTERFACE_SKELETON (user_data); # 660|-> g_dbus_interface_method_dispatch_helper (interface, # 661| g_dbus_interface_skeleton_get_vtable (interface)->method_call, # 662| invocation); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gdummyfile.c: scope_hint: In function ‘g_string_append_encoded’ glib-2.80.0/gio/gdummyfile.c:690:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘encoded’ glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/gdummyfile.h:26: included_from: Included from here. glib-2.80.0/gio/gdummyfile.c:32: included_from: Included from here. glib-2.80.0/gio/gdummyfile.c:355:32: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gdummyfile.c: scope_hint: In function ‘g_string_append_encoded’ # 688| static const gchar hex[] = "0123456789ABCDEF"; # 689| # 690|-> while ((c = *encoded) != 0) # 691| { # 692| if (is_valid (c, reserved_chars_allowed)) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gfile.c: scope_hint: In function ‘copy_symlink’ glib-2.80.0/gio/gfile.c:2634:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gfile.h:30: included_from: Included from here. glib-2.80.0/gio/gfile.c:59: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gfile.c:1332:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gfile.h:36:33: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gfile.c:1332:25: note: in expansion of macro ‘G_IS_FILE’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gfile.c:1332:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gfile.h:36:33: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gfile.c:1332:25: note: in expansion of macro ‘G_IS_FILE’ glib-2.80.0/gobject/gobject.h:26: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:31: included_from: Included from here. glib-2.80.0/gobject/gtype.h:584:66: note: in expansion of macro ‘_G_TYPE_IGI’ glib-2.80.0/gio/gfile.h:37:33: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_INTERFACE’ glib-2.80.0/gio/gfile.c:1337:11: note: in expansion of macro ‘G_FILE_GET_IFACE’ # 2632| /* Maybe it already existed, and we want to overwrite? */ # 2633| if (!tried_delete && (flags & G_FILE_COPY_OVERWRITE) && # 2634|-> my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_EXISTS) # 2635| { # 2636| g_clear_error (&my_error); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gfile.c: scope_hint: In function ‘open_source_for_copy’ glib-2.80.0/gio/gfile.c:2687:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_error’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gfile.c:1332:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gfile.h:36:33: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gfile.c:1332:25: note: in expansion of macro ‘G_IS_FILE’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gfile.c:1332:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gfile.h:36:33: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gfile.c:1332:25: note: in expansion of macro ‘G_IS_FILE’ glib-2.80.0/gobject/gtype.h:584:66: note: in expansion of macro ‘_G_TYPE_IGI’ glib-2.80.0/gio/gfile.h:37:33: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_INTERFACE’ glib-2.80.0/gio/gfile.c:1337:11: note: in expansion of macro ‘G_FILE_GET_IFACE’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gfile.c:1707:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gfile.h:36:33: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gfile.c:1707:25: note: in expansion of macro ‘G_IS_FILE’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/gio/gfile.c:1707:3: note: in expansion of macro ‘g_return_val_if_fail’ # 2685| # 2686| /* There was an error opening the source, try to set a good error for it: */ # 2687|-> if (my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_IS_DIRECTORY) # 2688| { # 2689| /* The source is a directory, don't fail with WOULD_RECURSE immediately, Error: CLANG_WARNING: glib-2.80.0/gio/gfile.c:2820:3: warning[deadcode.DeadStores]: Value stored to 'first' is never read # 2818| goto out; # 2819| # 2820|-> first = TRUE; # 2821| s = g_string_new (""); # 2822| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1610: error[legacyUninitvar]: Uninitialized variable: *&value # 1608| g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_TYPE_UNKNOWN); # 1609| # 1610|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_TYPE_UNKNOWN); # 1611| return (GFileType)_g_file_attribute_value_get_uint32 (value); # 1612| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1632: error[legacyUninitvar]: Uninitialized variable: *&value # 1630| g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE); # 1631| # 1632|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN, FALSE); # 1633| return _g_file_attribute_value_get_boolean (value); # 1634| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1654: error[legacyUninitvar]: Uninitialized variable: *&value # 1652| g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE); # 1653| # 1654|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP, FALSE); # 1655| return _g_file_attribute_value_get_boolean (value); # 1656| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1676: error[legacyUninitvar]: Uninitialized variable: *&value # 1674| g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE); # 1675| # 1676|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK, FALSE); # 1677| return _g_file_attribute_value_get_boolean (value); # 1678| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1698: error[legacyUninitvar]: Uninitialized variable: *&value # 1696| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1697| # 1698|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_NAME, NULL); # 1699| return _g_file_attribute_value_get_byte_string (value); # 1700| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1720: error[legacyUninitvar]: Uninitialized variable: *&value # 1718| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1719| # 1720|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, NULL); # 1721| return _g_file_attribute_value_get_string (value); # 1722| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1742: error[legacyUninitvar]: Uninitialized variable: *&value # 1740| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1741| # 1742|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME, NULL); # 1743| return _g_file_attribute_value_get_string (value); # 1744| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1765: error[legacyUninitvar]: Uninitialized variable: *&value # 1763| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1764| # 1765|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_ICON, NULL); # 1766| # 1767| obj = _g_file_attribute_value_get_object (value); Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1794: error[legacyUninitvar]: Uninitialized variable: *&value # 1792| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1793| # 1794|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON, NULL); # 1795| # 1796| obj = _g_file_attribute_value_get_object (value); Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1821: error[legacyUninitvar]: Uninitialized variable: *&value # 1819| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 1820| # 1821|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, NULL); # 1822| return _g_file_attribute_value_get_string (value); # 1823| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:1845: error[legacyUninitvar]: Uninitialized variable: *&value # 1843| g_return_val_if_fail (G_IS_FILE_INFO (info), (goffset) 0); # 1844| # 1845|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (goffset) 0); # 1846| return (goffset) _g_file_attribute_value_get_uint64 (value); # 1847| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:2061: error[legacyUninitvar]: Uninitialized variable: *&value # 2059| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 2060| # 2061|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, NULL); # 2062| return _g_file_attribute_value_get_byte_string (value); # 2063| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:2084: error[legacyUninitvar]: Uninitialized variable: *&value # 2082| g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); # 2083| # 2084|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_ETAG_VALUE, NULL); # 2085| return _g_file_attribute_value_get_string (value); # 2086| } Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gfileinfo.c:2107: error[legacyUninitvar]: Uninitialized variable: *&value # 2105| g_return_val_if_fail (G_IS_FILE_INFO (info), 0); # 2106| # 2107|-> get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER, 0); # 2108| return _g_file_attribute_value_get_int32 (value); # 2109| } Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gio/gio-launch-desktop.c: scope_hint: In function ‘main’ glib-2.80.0/gio/gio-launch-desktop.c:253:3: warning[-Wanalyzer-putenv-of-auto-var]: ‘putenv’ on a pointer to automatic variable ‘buf’ [POS34-C] glib-2.80.0/gio/gio-launch-desktop.c:243:8: note: ‘buf’ declared on stack here glib-2.80.0/gio/gio-launch-desktop.c:253:3: note: perhaps use ‘setenv’ rather than ‘putenv’ # 251| return -1; # 252| # 253|-> putenv (buf); # 254| # 255| #if defined(__linux__) && !defined(__BIONIC__) Error: CLANG_WARNING: glib-2.80.0/gio/tests/win32-appinfo.c:28: included_from: Included from here. glib-2.80.0/gio/giowin32-private.c:284:3: warning[deadcode.DeadStores]: Value stored to 'commandline' is never read # 282| _g_win32_parse_filename (commandline, FALSE, &executable, &execlen, &executable_basename, &first_argument); # 283| # 284|-> commandline = executable; # 285| # 286| while ((wchar_t) first_argument[0] == L' ') Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘strip_trailing_slashes’ glib-2.80.0/gio/glocalfile.c:1537:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/gio/glocalfile.c:26: included_from: Included from here. glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gfileattribute.h:30: included_from: Included from here. glib-2.80.0/gio/glocalfile.c:58: included_from: Included from here. glib-2.80.0/gio/glocalfile.c:1536:15: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘strip_trailing_slashes’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 1535| # 1536| path_copy = g_strdup (path); # 1537|-> len = strlen (path_copy); # 1538| while (len > 1 && path_copy[len-1] == '/') # 1539| path_copy[--len] = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘get_unique_filename’ glib-2.80.0/gio/glocalfile.c:1749:9: warning[-Wanalyzer-null-argument]: use of NULL ‘basename’ where non-null expected glib-2.80.0/gio/glocalfile.c:28: included_from: Included from here. glib-2.80.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’ glib-2.80.0/gio/glocalfile.c:2073:16: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘get_unique_filename’ glib-2.80.0/gio/glocalfile.c:1747:12: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘get_unique_filename’ glib-2.80.0/gio/glocalfile.c:1747:12: note: in expansion of macro ‘g_strdup’ <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1747| return g_strdup (basename); # 1748| # 1749|-> dot = strchr (basename, '.'); # 1750| if (dot) # 1751| return g_strdup_printf ("%.*s.%d%s", (int)(dot - basename), basename, id, dot); Error: CLANG_WARNING: glib-2.80.0/gio/gnetworkmonitornetlink.c:488:55: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') # 486| if (!read_netlink_messages (nl, &error)) # 487| { # 488|-> g_warning ("Error reading netlink message: %s", error->message); # 489| g_clear_error (&error); # 490| return FALSE; Error: CLANG_WARNING: glib-2.80.0/gio/gproxyaddressenumerator.c:301:16: warning[unix.Malloc]: Use of memory after it is freed # 299| port = g_inet_socket_address_get_port (inetsaddr); # 300| # 301|-> result = g_object_new (G_TYPE_PROXY_ADDRESS, # 302| "address", inetaddr, # 303| "port", port, Error: CLANG_WARNING: glib-2.80.0/gio/gresource.c:1476:7: warning[unix.Malloc]: Use of memory after it is freed # 1474| # 1475| g_resources_unregister_unlocked (resource); # 1476|-> g_resource_unref (resource); # 1477| } # 1478| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gresource.h:30: included_from: Included from here. glib-2.80.0/gio/gresourcefile.c:27: included_from: Included from here. glib-2.80.0/gio/gresourcefile.c: scope_hint: In function ‘canonicalize_filename’ glib-2.80.0/gio/gresourcefile.c:188:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘out’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ # 186| while (*in != 0) # 187| { # 188|-> g_assert (*out == '/'); # 189| # 190| /* move past slashes */ Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gresourcefile.c:223:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘out’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gresourcefile.c:188:7: note: in expansion of macro ‘g_assert’ # 221| # 222| /* Trim trailing / from path */ # 223|-> if (out > bptr && *out == '/') # 224| *out = 0; # 225| else Error: CPPCHECK_WARNING (CWE-758): glib-2.80.0/gio/gsettings.c:404: warning[objectIndex]: The address of local variable 'key' might be accessed at non-zero index. # 402| for (i = 0; i < n_keys; i++) # 403| { # 404|-> const gchar *key_name = g_quark_to_string (keys[i]); # 405| # 406| if (g_str_has_suffix (key_name, "/")) Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gsocket.c:2489: error[legacyUninitvar]: Uninitialized variable: result # 2487| g_return_val_if_reached (FALSE); # 2488| # 2489|-> if (result < 0) # 2490| { # 2491| int errsv = get_socket_errno (); Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/gsocket.c:2767: error[uninitvar]: Uninitialized variable: result # 2765| } # 2766| # 2767|-> if (result < 0) # 2768| { # 2769| int errsv = get_socket_errno (); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/gsocket.c: scope_hint: In function ‘g_socket_send_messages_with_timeout’ glib-2.80.0/gio/gsocket.c:4823:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cmsg’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gsocket.h:32: included_from: Included from here. glib-2.80.0/gio/gsocket.c:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocket.c:5417:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gsocket.h:41:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gsocket.c:5417:25: note: in expansion of macro ‘G_IS_SOCKET’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocket.c:5417:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gsocket.h:41:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gsocket.c:5417:25: note: in expansion of macro ‘G_IS_SOCKET’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocket.c:5418:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocket.c:5419:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gio/gsocket.c:4747:42: note: in definition of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ /usr/include/sys/socket.h:33: included_from: Included from here. /usr/include/net/if.h:26: included_from: Included from here. glib-2.80.0/gio/gsocket.c:50: included_from: Included from here. glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ glib-2.80.0/gio/gsocket.c:5457:9: note: in expansion of macro ‘output_message_to_msghdr’ # 4821| for (i = 0; i < _message->num_control_messages; i++) \ # 4822| { \ # 4823|-> cmsg->cmsg_level = g_socket_control_message_get_level (_message->control_messages[i]); \ # 4824| cmsg->cmsg_type = g_socket_control_message_get_msg_type (_message->control_messages[i]); \ # 4825| cmsg->cmsg_len = CMSG_LEN (g_socket_control_message_get_size (_message->control_messages[i])); \ Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/gsocketlistener.c: scope_hint: In function ‘g_socket_listener_accept_socket’ glib-2.80.0/gio/gsocketlistener.c:727:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data.socket’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gsocketlistener.h:35: included_from: Included from here. glib-2.80.0/gio/gsocketlistener.c:29: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocketlistener.c:698:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gsocketlistener.h:44:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gsocketlistener.c:698:25: note: in expansion of macro ‘G_IS_SOCKET_LISTENER’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gsocketlistener.c:698:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gsocketlistener.h:44:62: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gsocketlistener.c:698:25: note: in expansion of macro ‘G_IS_SOCKET_LISTENER’ # 725| listener->priv->main_context); # 726| g_main_loop_run (loop); # 727|-> accept_socket = data.socket; # 728| free_sources (sources); # 729| g_main_loop_unref (loop); Error: CLANG_WARNING: glib-2.80.0/gio/gsrvtarget.c:288:39: warning[core.NullDereference]: Access to field 'data' results in a dereference of a null pointer (loaded from variable 't') # 286| for (t = targets; ; t = t->next) # 287| { # 288|-> weight = ((GSrvTarget *)t->data)->weight; # 289| if (weight >= val) # 290| break; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/gio/gunixmounts.c:215:11: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/glib/gprintf.h:23: included_from: Included from here. glib-2.80.0/glib/gstdio.h:24: included_from: Included from here. glib-2.80.0/gio/gunixmounts.c:46: included_from: Included from here. glib-2.80.0/gio/gunixmounts.c:455:30: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/gio/gunixmounts.c:456:29: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/gio/gunixmounts.c:457:28: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/gio/gunixmounts.c:458:34: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/gio/gunixmounts.c:459:26: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘is_in’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gunixmounts.c:363:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gunixmounts.c:397:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gio/gunixmounts.c:44: included_from: Included from here. /usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null # 213| for (i = 0; set[i] != NULL; i++) # 214| { # 215|-> if (strcmp (set[i], value) == 0) # 216| return TRUE; # 217| } Error: CLANG_WARNING: glib-2.80.0/gio/gunixmounts.c:2080:26: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') # 2078| { # 2079| g_warning ("Error creating IO channel for %s: %s (%s, %d)", mtab_path, # 2080|-> error->message, g_quark_to_string (error->domain), error->code); # 2081| g_error_free (error); # 2082| } Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/inotify/inotify-sub.c: scope_hint: In function ‘dup_dirname’ glib-2.80.0/gio/inotify/inotify-sub.c:37:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gio/inotify/inotify-sub.c:26: included_from: Included from here. glib-2.80.0/gio/inotify/inotify-sub.c:36:22: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/inotify/inotify-sub.c: scope_hint: In function ‘dup_dirname’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 35| { # 36| gchar *d_dirname = g_strdup (dirname); # 37|-> size_t len = strlen (d_dirname); # 38| # 39| if (len > 1 && d_dirname[len - 1] == '/') Error: CPPCHECK_WARNING (CWE-628): glib-2.80.0/gio/strinfo.c:284: error[invalidFunctionArg]: Invalid memchr() argument nr 2. The value is -1 but the valid values are '0:'. # 282| # 283| /* find the end of this string */ # 284|-> ptr = memchr (ptr, '\xff', end - ptr); # 285| g_assert (ptr != NULL); # 286| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/appmonitor.c: scope_hint: In function ‘timeout_cb’ glib-2.80.0/gio/tests/appmonitor.c:95:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/appmonitor.c:22: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/appmonitor.c:94:3: note: in expansion of macro ‘g_assert’ # 93| # 94| g_assert (!timed_out); # 95|-> *timed_out = TRUE; # 96| g_main_context_wakeup (g_main_context_get_thread_default ()); # 97| Error: GCC_ANALYZER_WARNING (CWE-835): glib-2.80.0/glib/gthread.h:34: included_from: Included from here. glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/cancellable.c:25: included_from: Included from here. glib-2.80.0/gio/tests/cancellable.c: scope_hint: In function ‘cancel_cancellable_thread’ glib-2.80.0/gio/tests/cancellable.c:400:29: warning[-Wanalyzer-infinite-loop]: infinite loop glib-2.80.0/glib/gatomic.h:114:29: note: in definition of macro ‘g_atomic_int_get’ glib-2.80.0/glib/gatomic.h:114:29: note: in definition of macro ‘g_atomic_int_get’ glib-2.80.0/glib/gatomic.h:114:29: note: in definition of macro ‘g_atomic_int_get’ # 398| CancellablePollThreadData *thread_data = user_data; # 399| # 400|-> while (!g_atomic_int_get (&thread_data->polling_started)) # 401| ; # 402| Error: CLANG_WARNING: glib-2.80.0/gio/tests/gdbus-connection-flush.c:336:3: warning[deadcode.DeadStores]: Value stored to 'ok' is never read # 334| # 335| /* flush with fully-written, but unflushed, messages */ # 336|-> ok = g_dbus_connection_flush_sync (f->client_conn, NULL, &f->error); # 337| # 338| /* now we have flushed at least what we'd written - but before fixing Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/tests/gdbus-example-subtree.c:320: error[legacyUninitvar]: Uninitialized variable: vtable_to_return # 318| *out_user_data = user_data_to_return; # 319| # 320|-> return vtable_to_return; # 321| } # 322| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/tests/gdbus-testserver.c:669: error[legacyUninitvar]: Uninitialized variable: ret # 667| ret = v; # 668| # 669|-> g_dbus_method_invocation_return_value (invocation, ret); # 670| g_variant_unref (v); # 671| } Error: GCC_ANALYZER_WARNING (CWE-131): glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/gsettings.c:8: included_from: Included from here. glib-2.80.0/gio/tests/gsettings.c: scope_hint: In function ‘test_strinfo’ glib-2.80.0/gio/tests/gsettings.c:2189:20: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/tests/gsettings.c:2160: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ # 2187| } # 2188| # 2189|-> g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "foo"), # 2190| ==, NULL); # 2191| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"), Error: GCC_ANALYZER_WARNING (CWE-131): glib-2.80.0/gio/tests/gsettings.c:2191:20: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ # 2189| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "foo"), # 2190| ==, NULL); # 2191|-> g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"), # 2192| ==, NULL); # 2193| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"), Error: GCC_ANALYZER_WARNING (CWE-131): glib-2.80.0/gio/tests/gsettings.c:2193:20: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ # 2191| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"), # 2192| ==, NULL); # 2193|-> g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"), # 2194| ==, "bar"); # 2195| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "quux"), Error: GCC_ANALYZER_WARNING (CWE-131): glib-2.80.0/gio/tests/gsettings.c:2195:20: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ # 2193| g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"), # 2194| ==, "bar"); # 2195|-> g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "quux"), # 2196| ==, NULL); # 2197| Error: GCC_ANALYZER_WARNING (CWE-131): glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/gio/tests/gsettings.c:2198:18: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/gsettings.c:2198:3: note: in expansion of macro ‘g_assert_true’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/gio/strinfo.c:135:14: note: in expansion of macro ‘GUINT32_TO_LE’ glib-2.80.0/glib/gtestutils.h:47:66: note: in definition of macro ‘g_assert_cmpstr’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/gsettings.c:2198:3: note: in expansion of macro ‘g_assert_true’ # 2196| ==, NULL); # 2197| # 2198|-> g_assert_true (strinfo_enum_from_string (strinfo, length, "foo", &result)); # 2199| g_assert_cmpint (result, ==, 1); # 2200| g_assert_true (strinfo_enum_from_string (strinfo, length, "bar", &result)); Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/tests/gsubprocess-testprog.c: scope_hint: In function ‘read_from_fd’ glib-2.80.0/gio/tests/gsubprocess-testprog.c:163:14: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/gsubprocess-testprog.c:1: included_from: Included from here. glib-2.80.0/gio/tests/gsubprocess-testprog.c:183:7: note: in expansion of macro ‘g_warning’ # 161| { # 162| g_print ("Usage: %s read-from-fd FD\n", argv[0]); # 163|-> return 1; # 164| } # 165| Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/gio/tests/gsubprocess.c: scope_hint: In function ‘get_test_subprocess_args’ glib-2.80.0/gio/tests/gsubprocess.c:62:15: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (1 consumed) glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/gsubprocess.c:1: included_from: Included from here. glib-2.80.0/gio/tests/gsubprocess.c:59:25: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/tests/gsubprocess.c: scope_hint: In function ‘get_test_subprocess_args’ glib-2.80.0/gio/tests/gsubprocess.c:63:27: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/tests/gsubprocess.c: scope_hint: In function ‘get_test_subprocess_args’ # 60| # 61| va_start (args, mode); # 62|-> while ((arg = va_arg (args, gpointer)) != NULL) # 63| g_ptr_array_add (ret, g_strdup (arg)); # 64| va_end (args); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/tests/gsubprocess.c: scope_hint: In function ‘on_communicate_complete’ glib-2.80.0/gio/tests/gsubprocess.c:766:24: warning[-Wanalyzer-null-argument]: use of NULL ‘stdout_data’ where non-null expected glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/gsubprocess.c:764:11: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/gsubprocess.c:764:11: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/gsubprocess.c:764:11: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/gio/tests/gsubprocess.c:764:11: note: in expansion of macro ‘g_assert_nonnull’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 764| g_assert_nonnull (stdout_str); # 765| stdout_data = (guint8*)stdout_str; # 766|-> stdout_len = strlen (stdout_str); # 767| } # 768| else Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/tests/gsubprocess.c: scope_hint: In function ‘test_cwd’ glib-2.80.0/gio/tests/gsubprocess.c:1506:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 1504| result = splice_to_string (stdout_stream, &local_error); # 1505| g_assert_no_error (local_error); # 1506|-> result_len = strlen (result); # 1507| # 1508| /* The result should end with a line ending */ Error: CLANG_WARNING: glib-2.80.0/gio/tests/gsubprocess.c:1956:3: warning[deadcode.DeadStores]: Value stored to 'success' is never read # 1954| g_object_unref (output_stream); # 1955| # 1956|-> success = g_subprocess_wait_check (proc, NULL, &error); # 1957| g_assert_no_error (error); # 1958| g_object_unref (proc); Error: CLANG_WARNING: glib-2.80.0/gio/tests/mimeapps.c:333:3: warning[deadcode.DeadStores]: Value stored to 'assoc' is never read # 331| # 332| /* we've unset XDG_DATA_DIRS so there should be no default */ # 333|-> assoc = g_key_file_get_string_list (keyfile, "Default Applications", contenttype, NULL, &error); # 334| g_assert_nonnull (error); # 335| g_clear_error (&error); Error: CLANG_WARNING: glib-2.80.0/gio/tests/mimeapps.c:352:3: warning[deadcode.DeadStores]: Value stored to 'assoc' is never read # 350| g_strfreev (assoc); # 351| # 352|-> assoc = g_key_file_get_string_list (keyfile, "Default Applications", contenttype, NULL, &error); # 353| g_assert_nonnull (error); # 354| g_clear_error (&error); Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gobject/gobject.h:26: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:31: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/pollable.c:23: included_from: Included from here. glib-2.80.0/gio/tests/pollable.c: scope_hint: In function ‘test_pollable_unix_pipe’ glib-2.80.0/gio/tests/pollable.c:200:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefds[0]’ glib-2.80.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/gpollableinputstream.h:33:53: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/pollable.c:200:8: note: in expansion of macro ‘G_POLLABLE_INPUT_STREAM’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/gio/tests/pollable.c:198:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/pollable.c:198:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/gpollableinputstream.h:33:53: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/pollable.c:200:8: note: in expansion of macro ‘G_POLLABLE_INPUT_STREAM’ # 198| g_assert_cmpint (status, ==, 0); # 199| # 200|-> in = G_POLLABLE_INPUT_STREAM (g_unix_input_stream_new (pipefds[0], TRUE)); # 201| out = g_unix_output_stream_new (pipefds[1], TRUE); # 202| Error: CLANG_WARNING: glib-2.80.0/gio/tests/proxy-test.c:1186:3: warning[deadcode.DeadStores]: Value stored to 'conn' is never read # 1184| # 1185| /* Trying to use something that is not a URI at all should fail. */ # 1186|-> conn = g_socket_client_connect_to_uri (client, "asdf", 0, NULL, &error); # 1187| g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT); # 1188| g_clear_error (&error); Error: CLANG_WARNING: glib-2.80.0/gio/tests/readwrite.c:69:3: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 67| verify_pos (iostream, strlen (original_data)); # 68| # 69|-> res = g_seekable_seek (G_SEEKABLE (iostream), # 70| 10, G_SEEK_SET, # 71| NULL, NULL); Error: CLANG_WARNING: glib-2.80.0/gio/tests/readwrite.c:82:3: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 80| verify_pos (iostream, strlen (original_data)); # 81| # 82|-> res = g_seekable_seek (G_SEEKABLE (iostream), # 83| 10, G_SEEK_SET, # 84| NULL, NULL); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_ip_async’ glib-2.80.0/gio/tests/socket.c:373:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/socket.c:371:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/tests/socket.c:371:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/gio/tests/socket.c:371:3: note: in expansion of macro ‘g_assert_nonnull’ # 371| g_assert_nonnull (data); # 372| # 373|-> addr = g_socket_get_local_address (data->server, &error); # 374| g_assert_no_error (error); # 375| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_ip_sync’ glib-2.80.0/gio/tests/socket.c:480:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 478| } # 479| # 480|-> addr = g_socket_get_local_address (data->server, &error); # 481| g_assert_no_error (error); # 482| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_ip_sync_dgram’ glib-2.80.0/gio/tests/socket.c:619:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 617| } # 618| # 619|-> dest_addr = g_socket_get_local_address (data->server, &error); # 620| g_assert_no_error (error); # 621| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_close_graceful’ glib-2.80.0/gio/tests/socket.c:1002:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 1000| } # 1001| # 1002|-> addr = g_socket_get_local_address (data->server, &error); # 1003| g_assert_no_error (error); # 1004| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_ipv6_v4mapped’ glib-2.80.0/gio/tests/socket.c:1121:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_ipv6_v4mapped’ # 1119| g_socket_set_timeout (client, 1); # 1120| # 1121|-> addr = g_socket_get_local_address (data->server, &error); # 1122| g_assert_no_error (error); # 1123| iaddr = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_timed_wait’ glib-2.80.0/gio/tests/socket.c:1170:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_timed_wait’ # 1168| } # 1169| # 1170|-> addr = g_socket_get_local_address (data->server, &error); # 1171| g_assert_no_error (error); # 1172| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_fd_reuse’ glib-2.80.0/gio/tests/socket.c:1256:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 1254| } # 1255| # 1256|-> addr = g_socket_get_local_address (data->server, &error); # 1257| g_assert_no_error (error); # 1258| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_unix_connection_ancillary_data’ glib-2.80.0/gio/tests/socket.c:1488:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pv[1]’ glib-2.80.0/gio/tests/socket.c:1466:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/socket.c:1466:3: note: in expansion of macro ‘g_assert_cmpint’ # 1486| connection = create_connection_for_fd (sv[0]); # 1487| # 1488|-> status = close (pv[1]); # 1489| g_assert_cmpint (status, ==, 0); # 1490| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/socket.c:1512:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pv[1]’ glib-2.80.0/gio/tests/socket.c:1466:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/socket.c:1466:3: note: in expansion of macro ‘g_assert_cmpint’ # 1510| # 1511| err = NULL; # 1512|-> g_unix_connection_send_fd (G_UNIX_CONNECTION (connection), pv[1], NULL, # 1513| &err); # 1514| g_assert_no_error (err); Error: GCC_ANALYZER_WARNING (CWE-775): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_unix_connection_ancillary_data’ glib-2.80.0/gio/tests/socket.c:1536:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pv[0]’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/socket.c:21: included_from: Included from here. glib-2.80.0/gio/tests/socket.c:1466:3: note: in expansion of macro ‘g_assert_cmpint’ # 1534| * g_unix_connection_receive_credentials(). # 1535| */ # 1536|-> } # 1537| #endif # 1538| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_credentials_tcp_client’ glib-2.80.0/gio/tests/socket.c:2036:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2034| } # 2035| # 2036|-> addr = g_socket_get_local_address (data->server, &error); # 2037| g_assert_no_error (error); # 2038| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_receive_bytes’ glib-2.80.0/gio/tests/socket.c:2369:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2367| } # 2368| # 2369|-> addr = g_socket_get_local_address (data->server, &error); # 2370| g_assert_no_error (error); # 2371| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/tests/socket.c: scope_hint: In function ‘test_receive_bytes_from’ glib-2.80.0/gio/tests/socket.c:2469:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 2467| } # 2468| # 2469|-> dest_addr = g_socket_get_local_address (data->server, &error); # 2470| g_assert_no_error (error); # 2471| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/gio/tests/srvtarget.c:124: warning[uninitvar]: Uninitialized variable: result # 122| for (o = 0; o < NUM_ORDERINGS; o++) # 123| { # 124|-> if (!strcmp (result, ordering[o].order)) # 125| { # 126| ordering[o].seen++; Error: CLANG_WARNING: glib-2.80.0/gio/tests/tls-certificate.c:71:3: warning[deadcode.DeadStores]: Value stored to 'cert' is never read # 69| /* Make sure length is respected and parser detect invalid PEM # 70| * when cert is truncated. */ # 71|-> cert = g_tls_certificate_new_from_pem (pem, 10, &error); # 72| g_assert_error (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE); # 73| g_clear_error (&error); Error: CLANG_WARNING: glib-2.80.0/gio/tests/tls-certificate.c:77:3: warning[deadcode.DeadStores]: Value stored to 'cert' is never read # 75| /* Make sure length is respected and parser detect invalid PEM # 76| * when cert exists but key is truncated. */ # 77|-> cert = g_tls_certificate_new_from_pem (pem, pem_len - 10, &error); # 78| g_assert_error (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE); # 79| g_clear_error (&error); Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/gio/tests/tls-certificate.c:409: warning[nullPointer]: Possible null pointer dereference: l # 407| for (i = 0; i < 3; i++) # 408| { # 409|-> GTlsCertificate *cert = l->data; # 410| gchar *parsed_cert_pem = NULL; # 411| g_object_get (cert, Error: GCC_ANALYZER_WARNING (CWE-775): glib-2.80.0/gio/tests/unix-fd.c: scope_hint: In function ‘check_fd_list’ glib-2.80.0/gio/tests/unix-fd.c:32:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘my_fd’ # 30| for (i = 0; i < 40; i++) # 31| g_close (fd_list[i], NULL); # 32|-> } # 33| # 34| static void Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gobject/gobject.h:26: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:31: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gio.h:28: included_from: Included from here. glib-2.80.0/gio/tests/unix-streams.c:24: included_from: Included from here. glib-2.80.0/gio/tests/unix-streams.c: scope_hint: In function ‘test_read_write’ glib-2.80.0/gio/tests/unix-streams.c:444:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’ glib-2.80.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/gunixinputstream.h:31:43: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/unix-streams.c:444:8: note: in expansion of macro ‘G_UNIX_INPUT_STREAM’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:442:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:442:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gobject/gtype.h:2656:57: note: in definition of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/gunixinputstream.h:31:43: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/unix-streams.c:444:8: note: in expansion of macro ‘G_UNIX_INPUT_STREAM’ # 442| g_assert_cmpint (pipe (fd), ==, 0); # 443| # 444|-> is = G_UNIX_INPUT_STREAM (g_unix_input_stream_new (fd[0], TRUE)); # 445| os = G_UNIX_OUTPUT_STREAM (g_unix_output_stream_new (fd[1], TRUE)); # 446| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/unix-streams.c: scope_hint: In function ‘test_write_wouldblock’ glib-2.80.0/gio/tests/unix-streams.c:492:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:490:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:490:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ # 490| g_assert_cmpint (pipe (fd), ==, 0); # 491| # 492|-> g_assert_cmpint (fcntl (fd[0], F_SETPIPE_SZ, 4096, NULL), !=, 0); # 493| retval = fcntl (fd[0], F_GETPIPE_SZ); # 494| g_assert_cmpint (retval, >=, 0); Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/unix-streams.c: scope_hint: In function ‘test_writev_wouldblock’ glib-2.80.0/gio/tests/unix-streams.c:575:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:573:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:573:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ # 573| g_assert_cmpint (pipe (fd), ==, 0); # 574| # 575|-> g_assert_cmpint (fcntl (fd[0], F_SETPIPE_SZ, 4096, NULL), !=, 0); # 576| retval = fcntl (fd[0], F_GETPIPE_SZ); # 577| g_assert_cmpint (retval, >=, 0); Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/unix-streams.c: scope_hint: In function ‘test_write_async_wouldblock’ glib-2.80.0/gio/tests/unix-streams.c:697:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:687:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:687:3: note: in expansion of macro ‘g_assert_cmpint’ # 695| * See https://gitlab.gnome.org/GNOME/glib/issues/1654 # 696| */ # 697|-> g_unix_set_fd_nonblocking (fd[0], TRUE, NULL); # 698| g_unix_set_fd_nonblocking (fd[1], TRUE, NULL); # 699| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/unix-streams.c: scope_hint: In function ‘test_writev_async_wouldblock’ glib-2.80.0/gio/tests/unix-streams.c:788:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:778:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/unix-streams.c:778:3: note: in expansion of macro ‘g_assert_cmpint’ # 786| * See https://gitlab.gnome.org/GNOME/glib/issues/1654 # 787| */ # 788|-> g_unix_set_fd_nonblocking (fd[0], TRUE, NULL); # 789| g_unix_set_fd_nonblocking (fd[1], TRUE, NULL); # 790| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmime.c: scope_hint: In function ‘xdg_dir_time_list_add’ glib-2.80.0/gio/xdgmime/xdgmime.c:108:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’ glib-2.80.0/gio/xdgmime/xdgmime.c:30: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmime.c:16: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:19:55: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmime.c:141:29: note: in expansion of macro ‘_xdg_mime_cache_new_from_file’ # 106| list = calloc (1, sizeof (XdgDirTimeList)); # 107| list->checked = XDG_CHECKED_UNCHECKED; # 108|-> list->directory_name = file_name; # 109| list->mtime = mtime; # 110| list->next = dir_time_list; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c: scope_hint: In function ‘xdg_mime_init_from_directory’ glib-2.80.0/gio/xdgmime/xdgmime.c:138:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 136| # 137| file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1); # 138|-> strcpy (file_name, directory); strcat (file_name, "/mime.cache"); # 139| if (stat (file_name, &st) == 0) # 140| { Error: CPPCHECK_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmime.c:147: error[memleakOnRealloc]: Common realloc mistake: '_caches' nulled but not freed upon failure # 145| xdg_dir_time_list_add (file_name, st.st_mtime); # 146| # 147|-> _caches = realloc (_caches, sizeof (XdgMimeCache *) * (n_caches + 2)); # 148| _caches[n_caches] = cache; # 149| _caches[n_caches + 1] = NULL; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:158:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 156| # 157| file_name = malloc (strlen (directory) + strlen ("/globs2") + 1); # 158|-> strcpy (file_name, directory); strcat (file_name, "/globs2"); # 159| if (stat (file_name, &st) == 0) # 160| { Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:168:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 166| free (file_name); # 167| file_name = malloc (strlen (directory) + strlen ("/globs") + 1); # 168|-> strcpy (file_name, directory); strcat (file_name, "/globs"); # 169| if (stat (file_name, &st) == 0) # 170| { Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:181:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 179| # 180| file_name = malloc (strlen (directory) + strlen ("/magic") + 1); # 181|-> strcpy (file_name, directory); strcat (file_name, "/magic"); # 182| if (stat (file_name, &st) == 0) # 183| { Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:193:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 191| # 192| file_name = malloc (strlen (directory) + strlen ("/aliases") + 1); # 193|-> strcpy (file_name, directory); strcat (file_name, "/aliases"); # 194| _xdg_mime_alias_read_from_file (alias_list, file_name); # 195| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:198:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 196| # 197| file_name = malloc (strlen (directory) + strlen ("/subclasses") + 1); # 198|-> strcpy (file_name, directory); strcat (file_name, "/subclasses"); # 199| _xdg_mime_parent_read_from_file (parent_list, file_name); # 200| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:203:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 201| # 202| file_name = malloc (strlen (directory) + strlen ("/icons") + 1); # 203|-> strcpy (file_name, directory); strcat (file_name, "/icons"); # 204| _xdg_mime_icon_read_from_file (icon_list, file_name); # 205| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:208:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 206| # 207| file_name = malloc (strlen (directory) + strlen ("/generic-icons") + 1); # 208|-> strcpy (file_name, directory); strcat (file_name, "/generic-icons"); # 209| _xdg_mime_icon_read_from_file (generic_icon_list, file_name); # 210| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c: scope_hint: In function ‘xdg_init_dirs’ glib-2.80.0/gio/xdgmime/xdgmime.c:250:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mime_subdir’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 248| # 249| mime_subdir = malloc (strlen (xdg_data_home) + strlen ("/mime/") + 1); # 250|-> strcpy (mime_subdir, xdg_data_home); # 251| strcat (mime_subdir, "/mime/"); # 252| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmime.c:253:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’ # 251| strcat (mime_subdir, "/mime/"); # 252| # 253|-> xdg_dirs[current_dir++] = mime_subdir; # 254| } # 255| else if (home != NULL) Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:260:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘guessed_xdg_home’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 258| # 259| guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/mime/") + 1); # 260|-> strcpy (guessed_xdg_home, home); # 261| strcat (guessed_xdg_home, "/.local/share/mime/"); # 262| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmime.c:263:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’ # 261| strcat (guessed_xdg_home, "/.local/share/mime/"); # 262| # 263|-> xdg_dirs[current_dir++] = guessed_xdg_home; # 264| } # 265| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmime.c:300:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’ # 298| # 299| /* NULL terminator */ # 300|-> xdg_dirs[current_dir] = NULL; # 301| # 302| need_reread = TRUE; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c: scope_hint: In function ‘xdg_check_dir’ glib-2.80.0/gio/xdgmime/xdgmime.c:405:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:26:34: note: in definition of macro ‘_XDG_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:25: note: in expansion of macro ‘_XDG_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:37: note: in expansion of macro ‘XDG_PREFIX’ glib-2.80.0/gio/xdgmime/xdgmime.h:58:47: note: in expansion of macro ‘XDG_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmime.c:1020:1: note: in expansion of macro ‘xdg_mime_get_generic_icon’ <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 403| /* Check the mime.cache file */ # 404| file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1); # 405|-> strcpy (file_name, directory); strcat (file_name, "/mime.cache"); # 406| invalid = xdg_check_file (file_name, &exists); # 407| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:420:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:26:34: note: in definition of macro ‘_XDG_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:25: note: in expansion of macro ‘_XDG_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:37: note: in expansion of macro ‘XDG_PREFIX’ glib-2.80.0/gio/xdgmime/xdgmime.h:58:47: note: in expansion of macro ‘XDG_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmime.c:1020:1: note: in expansion of macro ‘xdg_mime_get_generic_icon’ <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 418| /* Check the globs file */ # 419| file_name = malloc (strlen (directory) + strlen ("/globs") + 1); # 420|-> strcpy (file_name, directory); strcat (file_name, "/globs"); # 421| invalid = xdg_check_file (file_name, NULL); # 422| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmime.c:431:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:26:34: note: in definition of macro ‘_XDG_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:25: note: in expansion of macro ‘_XDG_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmime.h:24:37: note: in expansion of macro ‘XDG_PREFIX’ glib-2.80.0/gio/xdgmime/xdgmime.h:58:47: note: in expansion of macro ‘XDG_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmime.c:1020:1: note: in expansion of macro ‘xdg_mime_get_generic_icon’ <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 429| /* Check the magic file */ # 430| file_name = malloc (strlen (directory) + strlen ("/magic") + 1); # 431|-> strcpy (file_name, directory); strcat (file_name, "/magic"); # 432| invalid = xdg_check_file (file_name, NULL); # 433| free (file_name); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimealias.c: scope_hint: In function ‘__gio_xdg_alias_list_new’ glib-2.80.0/gio/xdgmime/xdgmimealias.c:53:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’ # 51| list = malloc (sizeof (XdgAliasList)); # 52| # 53|-> list->aliases = NULL; # 54| list->n_aliases = 0; # 55| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimealias.c: scope_hint: In function ‘__gio_xdg_alias_read_from_file’ glib-2.80.0/gio/xdgmime/xdgmimealias.c:134:25: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.aliases’ # 132| { # 133| alloc <<= 1; # 134|-> list->aliases = realloc (list->aliases, # 135| alloc * sizeof (XdgAlias)); # 136| } Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimealias.c:141:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 139| list->n_aliases++; # 140| } # 141|-> list->aliases = realloc (list->aliases, # 142| list->n_aliases * sizeof (XdgAlias)); # 143| Error: GCC_ANALYZER_WARNING (CWE-122): glib-2.80.0/gio/xdgmime/xdgmimealias.c:141:19: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow # 139| list->n_aliases++; # 140| } # 141|-> list->aliases = realloc (list->aliases, # 142| list->n_aliases * sizeof (XdgAlias)); # 143| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimealias.c:147:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:16: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimealias.h:15: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimealias.c:16: included_from: Included from here. /usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null # 145| # 146| if (list->n_aliases > 1) # 147|-> qsort (list->aliases, list->n_aliases, # 148| sizeof (XdgAlias), alias_entry_cmp); # 149| } Error: CLANG_WARNING: glib-2.80.0/gio/xdgmime/xdgmimecache.c:248:27: warning[core.NullDereference]: Dereference of null pointer # 246| int *prio) # 247| { # 248|-> xdg_uint32_t priority = GET_UINT32 (cache->buffer, offset); # 249| xdg_uint32_t mimetype_offset = GET_UINT32 (cache->buffer, offset + 4); # 250| xdg_uint32_t n_matchlets = GET_UINT32 (cache->buffer, offset + 8); Error: CLANG_WARNING: glib-2.80.0/gio/xdgmime/xdgmimecache.c:408:8: warning[deadcode.DeadStores]: Value stored to 'weight' is never read # 406| int weight = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * mid + 8); # 407| int case_sensitive = weight & 0x100; # 408|-> weight = weight & 0xff; # 409| # 410| if (case_sensitive_check || !case_sensitive) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:1013:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘first_seen’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:14: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimecache.c:36: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:28:55: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:931:1: note: in expansion of macro ‘_xdg_mime_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:29:55: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:941:11: note: in expansion of macro ‘_xdg_mime_cache_unalias_mime_type’ glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:29:55: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:942:11: note: in expansion of macro ‘_xdg_mime_cache_unalias_mime_type’ glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimecache.h:29:55: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:942:11: note: in expansion of macro ‘_xdg_mime_cache_unalias_mime_type’ glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_mime_type_subclass’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:25: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimecache.c:982:21: note: in expansion of macro ‘GET_UINT32’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:986:19: note: in expansion of macro ‘GET_UINT32’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:987:11: note: in expansion of macro ‘OUT_OF_BOUNDS’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:1004:24: note: in expansion of macro ‘GET_UINT32’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:1009:35: note: in expansion of macro ‘GET_UINT32’ # 1011| # 1012| /* Detect and avoid buggy circular relationships */ # 1013|-> for (k = 0; (*seen)[k] != NULL; k++) # 1014| if (parent == (*seen)[k]) # 1015| goto next_parent; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimecache.c: scope_hint: In function ‘__gio_xdg_cache_list_mime_parents’ glib-2.80.0/gio/xdgmime/xdgmimecache.c:1118:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 1116| # 1117| result = (char **) malloc (p * sizeof (char *)); # 1118|-> memcpy (result, all_parents, p * sizeof (char *)); # 1119| # 1120| return result; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_list_append’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:112:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected glib-2.80.0/gio/xdgmime/xdgmimeglob.h:15: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimeglob.c:16: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:20: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:21: included_from: Included from here. /usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null # 110| while (tmp_element != NULL) # 111| { # 112|-> if (strcmp (tmp_element->data, data) == 0 && # 113| strcmp (tmp_element->mime_type, mime_type) == 0) # 114| return glob_list; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:113:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mime_type’ where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ /usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null # 111| { # 112| if (strcmp (tmp_element->data, data) == 0 && # 113|-> strcmp (tmp_element->mime_type, mime_type) == 0) # 114| return glob_list; # 115| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:120:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_element’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_list_append’ # 118| # 119| new_element = _xdg_glob_list_new (); # 120|-> new_element->data = data; # 121| new_element->mime_type = mime_type; # 122| new_element->weight = weight; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_hash_insert_ucs4’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:184:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_hash_insert_ucs4’ # 182| { # 183| node = _xdg_glob_hash_node_new (); # 184|-> node->character = character; # 185| node->next = glob_hash_node; # 186| glob_hash_node = node; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:207:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_hash_insert_ucs4’ # 205| { # 206| node = _xdg_glob_hash_node_new (); # 207|-> node->character = character; # 208| node->next = prev_node->next; # 209| prev_node->next = node; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:226:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_hash_insert_ucs4’ # 224| { # 225| node = _xdg_glob_hash_node_new (); # 226|-> node->character = character; # 227| node->next = prev_node->next; # 228| prev_node->next = node; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:257:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_hash_insert_ucs4’ # 255| child = _xdg_glob_hash_node_new (); # 256| child->character = 0; # 257|-> child->mime_type = strdup (mime_type); # 258| child->weight = weight; # 259| child->case_sensitive = case_sensitive; Error: CLANG_WARNING: glib-2.80.0/gio/xdgmime/xdgmimeglob.c:436:3: warning[deadcode.DeadStores]: Value stored to 'n' is never read # 434| assert (file_name != NULL && n_mime_types > 0); # 435| # 436|-> n = 0; # 437| # 438| lower_case = ascii_tolower (file_name); Error: CLANG_WARNING: glib-2.80.0/gio/xdgmime/xdgmimeglob.c:579:31: warning[unix.Malloc]: Potential memory leak # 577| { # 578| case XDG_GLOB_LITERAL: # 579|-> glob_hash->literal_list = _xdg_glob_list_append (glob_hash->literal_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 580| break; # 581| case XDG_GLOB_SIMPLE: Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:579:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(glob)’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ # 577| { # 578| case XDG_GLOB_LITERAL: # 579|-> glob_hash->literal_list = _xdg_glob_list_append (glob_hash->literal_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 580| break; # 581| case XDG_GLOB_SIMPLE: Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_list_append’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:579:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(mime_type)’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ # 577| { # 578| case XDG_GLOB_LITERAL: # 579|-> glob_hash->literal_list = _xdg_glob_list_append (glob_hash->literal_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 580| break; # 581| case XDG_GLOB_SIMPLE: Error: CLANG_WARNING: glib-2.80.0/gio/xdgmime/xdgmimeglob.c:585:28: warning[unix.Malloc]: Potential memory leak # 583| break; # 584| case XDG_GLOB_FULL: # 585|-> glob_hash->full_list = _xdg_glob_list_append (glob_hash->full_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 586| break; # 587| } Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:585:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(glob)’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:28:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:628:1: note: in expansion of macro ‘_xdg_mime_glob_read_from_file’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:705:7: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ # 583| break; # 584| case XDG_GLOB_FULL: # 585|-> glob_hash->full_list = _xdg_glob_list_append (glob_hash->full_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 586| break; # 587| } Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeglob.c:585:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(mime_type)’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:28:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:628:1: note: in expansion of macro ‘_xdg_mime_glob_read_from_file’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:705:7: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’ glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’ glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’ glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’ glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’ # 583| break; # 584| case XDG_GLOB_FULL: # 585|-> glob_hash->full_list = _xdg_glob_list_append (glob_hash->full_list, strdup (glob), strdup (mime_type), weight, case_sensitive); # 586| break; # 587| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeicon.c: scope_hint: In function ‘_gio_xdg_icon_list_new’ glib-2.80.0/gio/xdgmime/xdgmimeicon.c:52:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’ # 50| list = malloc (sizeof (XdgIconList)); # 51| # 52|-> list->icons = NULL; # 53| list->n_icons = 0; # 54| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeicon.c: scope_hint: In function ‘_gio_xdg_icon_read_from_file’ glib-2.80.0/gio/xdgmime/xdgmimeicon.c:133:23: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.icons’ # 131| { # 132| alloc <<= 1; # 133|-> list->icons = realloc (list->icons, # 134| alloc * sizeof (XdgIcon)); # 135| } Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeicon.c:140:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 138| list->n_icons++; # 139| } # 140|-> list->icons = realloc (list->icons, # 141| list->n_icons * sizeof (XdgIcon)); # 142| Error: GCC_ANALYZER_WARNING (CWE-122): glib-2.80.0/gio/xdgmime/xdgmimeicon.c:140:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow # 138| list->n_icons++; # 139| } # 140|-> list->icons = realloc (list->icons, # 141| list->n_icons * sizeof (XdgIcon)); # 142| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimeicon.c:146:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:16: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimeicon.h:14: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimeicon.c:15: included_from: Included from here. /usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null # 144| # 145| if (list->n_icons > 1) # 146|-> qsort (list->icons, list->n_icons, # 147| sizeof (XdgIcon), icon_entry_cmp); # 148| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeint.c: scope_hint: In function ‘__gio_xdg_convert_to_ucs4’ glib-2.80.0/gio/xdgmime/xdgmimeint.c:153:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’ # 151| while (*p) # 152| { # 153|-> out[i++] = _xdg_utf8_to_ucs4 (p); # 154| p = _xdg_utf8_next_char (p); # 155| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeint.c:156:10: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’ # 154| p = _xdg_utf8_next_char (p); # 155| } # 156|-> out[i] = 0; # 157| *len = i; # 158| Error: CPPCHECK_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimemagic.c:174: error[memleakOnRealloc]: Common realloc mistake: 'retval' nulled but not freed upon failure # 172| { # 173| len = len + 128; # 174|-> retval = realloc (retval, len); # 175| } # 176| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeparent.c: scope_hint: In function ‘__gio_xdg_parent_list_new’ glib-2.80.0/gio/xdgmime/xdgmimeparent.c:54:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’ # 52| list = malloc (sizeof (XdgParentList)); # 53| # 54|-> list->parents = NULL; # 55| list->n_mimes = 0; # 56| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeparent.c: scope_hint: In function ‘__gio_xdg_parent_read_from_file’ glib-2.80.0/gio/xdgmime/xdgmimeparent.c:141:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 139| for (i = 0; i < list->n_mimes; i++) # 140| { # 141|-> if (strcmp (list->parents[i].mime, line) == 0) # 142| { # 143| entry = &(list->parents[i]); Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:153:29: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.parents’ # 151| { # 152| alloc <<= 1; # 153|-> list->parents = realloc (list->parents, # 154| alloc * sizeof (XdgMimeParents)); # 155| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:173:44: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*entry.parents + ((long unsigned int)*entry.n_parents * 8 + 18446744073709551608)’ # 171| (entry->n_parents + 2) * sizeof (char *)); # 172| } # 173|-> entry->parents[entry->n_parents - 1] = strdup (sep); # 174| entry->parents[entry->n_parents] = NULL; # 175| } Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:177:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.parents’ # 175| } # 176| # 177|-> list->parents = realloc (list->parents, # 178| list->n_mimes * sizeof (XdgMimeParents)); # 179| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:177:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 175| } # 176| # 177|-> list->parents = realloc (list->parents, # 178| list->n_mimes * sizeof (XdgMimeParents)); # 179| Error: GCC_ANALYZER_WARNING (CWE-122): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:177:19: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow # 175| } # 176| # 177|-> list->parents = realloc (list->parents, # 178| list->n_mimes * sizeof (XdgMimeParents)); # 179| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/xdgmime/xdgmimeparent.c:183:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/gio/xdgmime/xdgmime.h:16: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimeparent.h:15: included_from: Included from here. glib-2.80.0/gio/xdgmime/xdgmimeparent.c:16: included_from: Included from here. /usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null # 181| # 182| if (list->n_mimes > 1) # 183|-> qsort (list->parents, list->n_mimes, # 184| sizeof (XdgMimeParents), &parent_entry_cmp); # 185| } Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_alloc_graph3’ glib-2.80.0/girepository/cmph/bdz.c:70:28: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz.c:70:28: note: only use operands of an integer type inside the size argument # 68| { # 69| graph3->edges=malloc(nedges*sizeof(bdz_edge_t)); # 70|-> graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32)); # 71| graph3->vert_degree=malloc((size_t)nvertices); # 72| }; Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz.c:71:29: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz.c:71:29: note: only use operands of an integer type inside the size argument # 69| graph3->edges=malloc(nedges*sizeof(bdz_edge_t)); # 70| graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32)); # 71|-> graph3->vert_degree=malloc((size_t)nvertices); # 72| }; # 73| static void bdz_init_graph3(bdz_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices) Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_init_graph3’ glib-2.80.0/girepository/cmph/bdz.c:75:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘graph3.first_edge’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 73| static void bdz_init_graph3(bdz_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices) # 74| { # 75|-> memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32)); # 76| memset(graph3->vert_degree,0,(size_t)nvertices); # 77| graph3->nedges=0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c:76:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘graph3.vert_degree’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 74| { # 75| memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32)); # 76|-> memset(graph3->vert_degree,0,(size_t)nvertices); # 77| graph3->nedges=0; # 78| }; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:129:7: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 127| cmph_uint32 i,j=0,vert,edge1,edge2; # 128| for(i=0;i<3;i++){ # 129|-> vert=graph3->edges[curr_edge].vertices[i]; # 130| edge1=graph3->first_edge[vert]; # 131| edge2=NULL_EDGE; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:134:39: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 132| while(edge1!=curr_edge&&edge1!=NULL_EDGE){ # 133| edge2=edge1; # 134|-> if(graph3->edges[edge1].vertices[0]==vert){ # 135| j=0; # 136| } else if(graph3->edges[edge1].vertices[1]==vert){ Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_generate_queue’ glib-2.80.0/girepository/cmph/bdz.c:166:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘marked_edge’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 164| cmph_uint32 tmp_edge; # 165| cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1); # 166|-> memset(marked_edge, 0, (size_t)(nedges >> 3) + 1); # 167| # 168| for(i=0;i<nedges;i++){ Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/girepository/cmph/bdz.c:169:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.vertices[0]’ # 167| # 168| for(i=0;i<nedges;i++){ # 169|-> v0=graph3->edges[i].vertices[0]; # 170| v1=graph3->edges[i].vertices[1]; # 171| v2=graph3->edges[i].vertices[2]; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz.c:176:52: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queue’ glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_generate_queue’ # 174| graph3->vert_degree[v2]==1){ # 175| if(!GETBIT(marked_edge,i)) { # 176|-> queue[queue_head++]=i; # 177| SETBIT(marked_edge,i); # 178| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_new’ glib-2.80.0/girepository/cmph/bdz.c:354:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ # 352| #endif # 353| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 354|-> mphf->algo = mph->algo; # 355| bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t)); # 356| bdzf->g = bdz->g; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz.c:356:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bdzf’ # 354| mphf->algo = mph->algo; # 355| bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t)); # 356|-> bdzf->g = bdz->g; # 357| bdz->g = NULL; //transfer memory ownership # 358| bdzf->hl = bdz->hl; Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘assigning’ glib-2.80.0/girepository/cmph/bdz.c:422:32: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz.c:422:32: note: only use operands of an integer type inside the size argument # 420| cmph_uint8 * marked_vertices =malloc((size_t)(bdz->n >> 3) + 1); # 421| cmph_uint32 sizeg = (cmph_uint32)ceil(bdz->n/4.0); # 422|-> bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 423| memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1); # 424| memset(bdz->g, 0xff, (size_t)(sizeg)); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c:423:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘marked_vertices’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 421| cmph_uint32 sizeg = (cmph_uint32)ceil(bdz->n/4.0); # 422| bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 423|-> memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1); # 424| memset(bdz->g, 0xff, (size_t)(sizeg)); # 425| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c:424:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*bdz.g’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 422| bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 423| memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1); # 424|-> memset(bdz->g, 0xff, (size_t)(sizeg)); # 425| # 426| for(i=nedges-1;i+1>0;i--){ Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz.c:424:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘calloc((long unsigned int)sizeg, 1)’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 422| bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 423| memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1); # 424|-> memset(bdz->g, 0xff, (size_t)(sizeg)); # 425| # 426| for(i=nedges-1;i+1>0;i--){ Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘ranking’ glib-2.80.0/girepository/cmph/bdz.c:468:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bdz.ranktable’ # 466| bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32)); # 467| // ranktable computation # 468|-> bdz->ranktable[0] = 0; # 469| i = 1; # 470| while(1) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz.c:468:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)*bdz.ranktablesize, 4)’ # 466| bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32)); # 467| // ranktable computation # 468|-> bdz->ranktable[0] = 0; # 469| i = 1; # 470| while(1) Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:500:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 498| hash_state_dump(data->hl, &buf, &buflen); # 499| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 500|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 501| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 502| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:501:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 499| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 500| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 501|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 502| free(buf); # 503| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:504:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 502| free(buf); # 503| # 504|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 505| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 506| nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:505:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 503| # 504| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 505|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 506| nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); # 507| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:506:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 504| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 505| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 506|-> nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); # 507| # 508| sizeg = (cmph_uint32)ceil(data->n/4.0); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:509:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 507| # 508| sizeg = (cmph_uint32)ceil(data->n/4.0); # 509|-> nbytes = fwrite(data->g, sizeof(cmph_uint8)*sizeg, (size_t)1, fd); # 510| # 511| nbytes = fwrite(&(data->k), sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:511:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 509| nbytes = fwrite(data->g, sizeof(cmph_uint8)*sizeg, (size_t)1, fd); # 510| # 511|-> nbytes = fwrite(&(data->k), sizeof(cmph_uint32), (size_t)1, fd); # 512| nbytes = fwrite(&(data->b), sizeof(cmph_uint8), (size_t)1, fd); # 513| nbytes = fwrite(&(data->ranktablesize), sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:512:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 510| # 511| nbytes = fwrite(&(data->k), sizeof(cmph_uint32), (size_t)1, fd); # 512|-> nbytes = fwrite(&(data->b), sizeof(cmph_uint8), (size_t)1, fd); # 513| nbytes = fwrite(&(data->ranktablesize), sizeof(cmph_uint32), (size_t)1, fd); # 514| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:513:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 511| nbytes = fwrite(&(data->k), sizeof(cmph_uint32), (size_t)1, fd); # 512| nbytes = fwrite(&(data->b), sizeof(cmph_uint8), (size_t)1, fd); # 513|-> nbytes = fwrite(&(data->ranktablesize), sizeof(cmph_uint32), (size_t)1, fd); # 514| # 515| nbytes = fwrite(data->ranktable, sizeof(cmph_uint32)*(data->ranktablesize), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:541:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 539| mphf->data = bdz; # 540| # 541|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 542| DEBUGP("Hash state has %u bytes\n", buflen); # 543| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bdz.c: scope_hint: In function ‘bdz_load’ glib-2.80.0/girepository/cmph/bdz.c:543:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bdz.c:543:23: note: heap-based allocation # 541| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 542| DEBUGP("Hash state has %u bytes\n", buflen); # 543|-> buf = (char *)malloc((size_t)buflen); # 544| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 545| bdz->hl = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:544:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 542| DEBUGP("Hash state has %u bytes\n", buflen); # 543| buf = (char *)malloc((size_t)buflen); # 544|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 545| bdz->hl = hash_state_load(buf, buflen); # 546| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:550:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 548| # 549| DEBUGP("Reading m and n\n"); # 550|-> nbytes = fread(&(bdz->n), sizeof(cmph_uint32), (size_t)1, f); # 551| nbytes = fread(&(bdz->m), sizeof(cmph_uint32), (size_t)1, f); # 552| nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:551:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 549| DEBUGP("Reading m and n\n"); # 550| nbytes = fread(&(bdz->n), sizeof(cmph_uint32), (size_t)1, f); # 551|-> nbytes = fread(&(bdz->m), sizeof(cmph_uint32), (size_t)1, f); # 552| nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f); # 553| sizeg = (cmph_uint32)ceil(bdz->n/4.0); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:552:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 550| nbytes = fread(&(bdz->n), sizeof(cmph_uint32), (size_t)1, f); # 551| nbytes = fread(&(bdz->m), sizeof(cmph_uint32), (size_t)1, f); # 552|-> nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f); # 553| sizeg = (cmph_uint32)ceil(bdz->n/4.0); # 554| bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz.c:554:32: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz.c:554:32: note: only use operands of an integer type inside the size argument # 552| nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f); # 553| sizeg = (cmph_uint32)ceil(bdz->n/4.0); # 554|-> bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 555| nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f); # 556| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:555:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 553| sizeg = (cmph_uint32)ceil(bdz->n/4.0); # 554| bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8)); # 555|-> nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f); # 556| # 557| nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:557:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 555| nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f); # 556| # 557|-> nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f); # 558| nbytes = fread(&(bdz->b), sizeof(cmph_uint8), (size_t)1, f); # 559| nbytes = fread(&(bdz->ranktablesize), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:558:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 556| # 557| nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f); # 558|-> nbytes = fread(&(bdz->b), sizeof(cmph_uint8), (size_t)1, f); # 559| nbytes = fread(&(bdz->ranktablesize), sizeof(cmph_uint32), (size_t)1, f); # 560| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz.c:559:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 557| nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f); # 558| nbytes = fread(&(bdz->b), sizeof(cmph_uint8), (size_t)1, f); # 559|-> nbytes = fread(&(bdz->ranktablesize), sizeof(cmph_uint32), (size_t)1, f); # 560| # 561| bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32)); Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_alloc_graph3’ glib-2.80.0/girepository/cmph/bdz_ph.c:57:28: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz_ph.c:57:28: note: only use operands of an integer type inside the size argument # 55| { # 56| graph3->edges=malloc(nedges*sizeof(bdz_ph_edge_t)); # 57|-> graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32)); # 58| graph3->vert_degree=malloc((size_t)nvertices); # 59| }; Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:58:29: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz_ph.c:58:29: note: only use operands of an integer type inside the size argument # 56| graph3->edges=malloc(nedges*sizeof(bdz_ph_edge_t)); # 57| graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32)); # 58|-> graph3->vert_degree=malloc((size_t)nvertices); # 59| }; # 60| static void bdz_ph_init_graph3(bdz_ph_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices) Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_init_graph3’ glib-2.80.0/girepository/cmph/bdz_ph.c:62:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘graph3.first_edge’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 60| static void bdz_ph_init_graph3(bdz_ph_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices) # 61| { # 62|-> memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32)); # 63| memset(graph3->vert_degree,0,(size_t)nvertices); # 64| graph3->nedges=0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz_ph.c:63:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘graph3.vert_degree’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 61| { # 62| memset(graph3->first_edge,0xff,nvertices*sizeof(cmph_uint32)); # 63|-> memset(graph3->vert_degree,0,(size_t)nvertices); # 64| graph3->nedges=0; # 65| }; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:116:7: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 114| cmph_uint32 i,j=0,vert,edge1,edge2; # 115| for(i=0;i<3;i++){ # 116|-> vert=graph3->edges[curr_edge].vertices[i]; # 117| edge1=graph3->first_edge[vert]; # 118| edge2=NULL_EDGE; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:121:39: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 119| while(edge1!=curr_edge&&edge1!=NULL_EDGE){ # 120| edge2=edge1; # 121|-> if(graph3->edges[edge1].vertices[0]==vert){ # 122| j=0; # 123| } else if(graph3->edges[edge1].vertices[1]==vert){ Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_generate_queue’ glib-2.80.0/girepository/cmph/bdz_ph.c:153:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘marked_edge’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 151| cmph_uint32 tmp_edge; # 152| cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1); # 153|-> memset(marked_edge, 0, (size_t)(nedges >> 3) + 1); # 154| # 155| for(i=0;i<nedges;i++){ Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/girepository/cmph/bdz_ph.c:156:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.vertices[0]’ # 154| # 155| for(i=0;i<nedges;i++){ # 156|-> v0=graph3->edges[i].vertices[0]; # 157| v1=graph3->edges[i].vertices[1]; # 158| v2=graph3->edges[i].vertices[2]; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz_ph.c:163:52: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queue’ glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_generate_queue’ # 161| graph3->vert_degree[v2]==1){ # 162| if(!GETBIT(marked_edge,i)) { # 163|-> queue[queue_head++]=i; # 164| SETBIT(marked_edge,i); # 165| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_new’ glib-2.80.0/girepository/cmph/bdz_ph.c:324:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ # 322| #endif # 323| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 324|-> mphf->algo = mph->algo; # 325| bdz_phf = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t)); # 326| bdz_phf->g = bdz_ph->g; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz_ph.c:326:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bdz_phf’ # 324| mphf->algo = mph->algo; # 325| bdz_phf = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t)); # 326|-> bdz_phf->g = bdz_ph->g; # 327| bdz_ph->g = NULL; //transfer memory ownership # 328| bdz_phf->hl = bdz_ph->hl; Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘assigning’ glib-2.80.0/girepository/cmph/bdz_ph.c:387:35: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz_ph.c:387:35: note: only use operands of an integer type inside the size argument # 385| cmph_uint8 * marked_vertices =malloc((size_t)(bdz_ph->n >> 3) + 1); # 386| cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/4.0); # 387|-> bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8)); # 388| memset(marked_vertices, 0, (size_t)(bdz_ph->n >> 3) + 1); # 389| //memset(bdz_ph->g, 0xff, sizeg); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bdz_ph.c:388:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘marked_vertices’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 386| cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/4.0); # 387| bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8)); # 388|-> memset(marked_vertices, 0, (size_t)(bdz_ph->n >> 3) + 1); # 389| //memset(bdz_ph->g, 0xff, sizeg); # 390| Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_optimization’ glib-2.80.0/girepository/cmph/bdz_ph.c:432:44: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz_ph.c:432:44: note: only use operands of an integer type inside the size argument # 430| cmph_uint8 byte = 0; # 431| cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0); # 432|-> cmph_uint8 * new_g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8)); # 433| cmph_uint8 value; # 434| cmph_uint32 idx; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz_ph.c:438:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_g’ # 436| { # 437| idx = i/5; # 438|-> byte = new_g[idx]; # 439| value = GETVALUE(bdz_ph->g, i); # 440| byte = (cmph_uint8) (byte + value*pow3_table[i%5U]); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:463:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 461| hash_state_dump(data->hl, &buf, &buflen); # 462| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 463|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 464| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 465| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:464:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 462| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 463| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 464|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 465| free(buf); # 466| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:467:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 465| free(buf); # 466| # 467|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 468| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 469| nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:468:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 466| # 467| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 468|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 469| nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); # 470| sizeg = (cmph_uint32)ceil(data->n/5.0); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:469:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 467| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 468| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 469|-> nbytes = fwrite(&(data->r), sizeof(cmph_uint32), (size_t)1, fd); # 470| sizeg = (cmph_uint32)ceil(data->n/5.0); # 471| nbytes = fwrite(data->g, sizeof(cmph_uint8)*sizeg, (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:496:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 494| mphf->data = bdz_ph; # 495| # 496|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 497| DEBUGP("Hash state has %u bytes\n", buflen); # 498| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bdz_ph.c: scope_hint: In function ‘bdz_ph_load’ glib-2.80.0/girepository/cmph/bdz_ph.c:498:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bdz_ph.c:498:23: note: heap-based allocation # 496| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 497| DEBUGP("Hash state has %u bytes\n", buflen); # 498|-> buf = (char *)malloc((size_t)buflen); # 499| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 500| bdz_ph->hl = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:499:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 497| DEBUGP("Hash state has %u bytes\n", buflen); # 498| buf = (char *)malloc((size_t)buflen); # 499|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 500| bdz_ph->hl = hash_state_load(buf, buflen); # 501| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:505:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 503| # 504| DEBUGP("Reading m and n\n"); # 505|-> nbytes = fread(&(bdz_ph->n), sizeof(cmph_uint32), (size_t)1, f); # 506| nbytes = fread(&(bdz_ph->m), sizeof(cmph_uint32), (size_t)1, f); # 507| nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:506:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 504| DEBUGP("Reading m and n\n"); # 505| nbytes = fread(&(bdz_ph->n), sizeof(cmph_uint32), (size_t)1, f); # 506|-> nbytes = fread(&(bdz_ph->m), sizeof(cmph_uint32), (size_t)1, f); # 507| nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f); # 508| sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:507:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 505| nbytes = fread(&(bdz_ph->n), sizeof(cmph_uint32), (size_t)1, f); # 506| nbytes = fread(&(bdz_ph->m), sizeof(cmph_uint32), (size_t)1, f); # 507|-> nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f); # 508| sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0); # 509| bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8)); Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/bdz_ph.c:509:35: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/bdz_ph.c:509:35: note: only use operands of an integer type inside the size argument # 507| nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f); # 508| sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0); # 509|-> bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8)); # 510| nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f); # 511| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bdz_ph.c:5: included_from: Included from here. glib-2.80.0/girepository/cmph/bitbool.h:80:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bdz_ph.g + (sizetype)(i >> 2)’ glib-2.80.0/girepository/cmph/bdz_ph.c:439:21: note: in expansion of macro ‘GETVALUE’ glib-2.80.0/girepository/cmph/bdz_ph.c:439:21: note: in expansion of macro ‘GETVALUE’ # 78| * GETVALUE(array, i) is a macro that get a value for a 2-bit integer stored in an array. # 79| */ # 80|-> #define GETVALUE(array, i) ((cmph_uint8)((array[i >> 2] >> ((i & 0x00000003U) << 1U)) & 0x00000003U)) # 81| # 82| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/compressed_rank.c:6: included_from: Included from here. glib-2.80.0/girepository/cmph/bitbool.h: scope_hint: In function ‘set_bits_value’ glib-2.80.0/girepository/cmph/bitbool.h:121:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’ # 119| register cmph_uint32 shift2 = 32 - shift1; # 120| # 121|-> bits_table[word_idx] &= ~((string_mask) << shift1); # 122| bits_table[word_idx] |= bits_string << shift1; # 123| Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h:126:59: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 124| if(shift2 < string_length) # 125| { # 126|-> bits_table[word_idx+1] &= ~((string_mask) >> shift2); # 127| bits_table[word_idx+1] |= bits_string >> shift2; # 128| }; Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h:127:55: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 125| { # 126| bits_table[word_idx+1] &= ~((string_mask) >> shift2); # 127|-> bits_table[word_idx+1] |= bits_string >> shift2; # 128| }; # 129| }; Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h: scope_hint: In function ‘get_bits_value’ glib-2.80.0/girepository/cmph/bitbool.h:142:56: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 140| # 141| if(shift2 < string_length) # 142|-> bits_string |= (bits_table[word_idx+1] << shift2) & string_mask; # 143| # 144| return bits_string; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bitbool.h: scope_hint: In function ‘set_bits_at_pos’ glib-2.80.0/girepository/cmph/bitbool.h:154:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’ # 152| register cmph_uint32 string_mask = (1U << string_length) - 1; # 153| # 154|-> bits_table[word_idx] &= ~((string_mask) << shift1); # 155| bits_table[word_idx] |= bits_string << shift1; # 156| if(shift2 < string_length) Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h:158:59: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 156| if(shift2 < string_length) # 157| { # 158|-> bits_table[word_idx+1] &= ~((string_mask) >> shift2); # 159| bits_table[word_idx+1] |= bits_string >> shift2; # 160| } Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h:159:55: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 157| { # 158| bits_table[word_idx+1] &= ~((string_mask) >> shift2); # 159|-> bits_table[word_idx+1] |= bits_string >> shift2; # 160| } # 161| }; Error: GCC_ANALYZER_WARNING (CWE-1335): glib-2.80.0/girepository/cmph/bitbool.h: scope_hint: In function ‘get_bits_at_pos’ glib-2.80.0/girepository/cmph/bitbool.h:174:56: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’) # 172| # 173| if(shift2 < string_length) # 174|-> bits_string |= (bits_table[word_idx+1] << shift2) & string_mask; # 175| return bits_string; # 176| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz.c: scope_hint: In function ‘bmz_new’ glib-2.80.0/girepository/cmph/bmz.c:79:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bmz.hashes + (long unsigned int)i * 8’ # 77| # 78| bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3); # 79|-> for(i = 0; i < 3; ++i) bmz->hashes[i] = NULL; # 80| # 81| do Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bmz.c:136:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visited’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 134| DEBUGP("Searching step\n"); # 135| visited = (cmph_uint8 *)malloc((size_t)bmz->n/8 + 1); # 136|-> memset(visited, 0, (size_t)bmz->n/8 + 1); # 137| used_edges = (cmph_uint8 *)malloc((size_t)bmz->m/8 + 1); # 138| memset(used_edges, 0, (size_t)bmz->m/8 + 1); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bmz.c:138:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘used_edges’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 136| memset(visited, 0, (size_t)bmz->n/8 + 1); # 137| used_edges = (cmph_uint8 *)malloc((size_t)bmz->m/8 + 1); # 138|-> memset(used_edges, 0, (size_t)bmz->m/8 + 1); # 139| free(bmz->g); # 140| bmz->g = (cmph_uint32 *)calloc((size_t)bmz->n, sizeof(cmph_uint32)); Error: CPPCHECK_WARNING (CWE-401): glib-2.80.0/girepository/cmph/bmz.c:321: error[memleakOnRealloc]: Common realloc mistake: 'unused_g_values' nulled but not freed upon failure # 319| if(nunused_g_values == unused_g_values_capacity) # 320| { # 321|-> unused_g_values = (cmph_uint32 *)realloc(unused_g_values, (unused_g_values_capacity + BUFSIZ)*sizeof(cmph_uint32)); # 322| unused_g_values_capacity += BUFSIZ; # 323| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz.c: scope_hint: In function ‘bmz_traverse_critical_nodes_heuristic’ glib-2.80.0/girepository/cmph/bmz.c:324:85: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘unused_g_values’ glib-2.80.0/girepository/cmph/bmz.c:7: included_from: Included from here. glib-2.80.0/girepository/cmph/bmz.c:310:61: note: in expansion of macro ‘GETBIT’ # 322| unused_g_values_capacity += BUFSIZ; # 323| } # 324|-> unused_g_values[nunused_g_values++] = next_g; # 325| # 326| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:459:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 457| __cmph_dump(mphf, fd); # 458| # 459|-> nbytes = fwrite(&two, sizeof(cmph_uint32), (size_t)1, fd); # 460| # 461| hash_state_dump(data->hashes[0], &buf, &buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:463:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 461| hash_state_dump(data->hashes[0], &buf, &buflen); # 462| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 463|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 464| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 465| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:464:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 462| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 463| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 464|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 465| free(buf); # 466| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:469:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 467| hash_state_dump(data->hashes[1], &buf, &buflen); # 468| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 469|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 470| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 471| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:470:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 468| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 469| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 470|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 471| free(buf); # 472| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:473:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 471| free(buf); # 472| # 473|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 474| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 475| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:474:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 472| # 473| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 474|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 475| # 476| nbytes = fwrite(data->g, sizeof(cmph_uint32)*(data->n), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:499:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 497| DEBUGP("Loading bmz mphf\n"); # 498| mphf->data = bmz; # 499|-> nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 500| bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 501| bmz->hashes[nhashes] = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz.c: scope_hint: In function ‘bmz_load’ glib-2.80.0/girepository/cmph/bmz.c:500:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bmz’ # 498| mphf->data = bmz; # 499| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 500|-> bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 501| bmz->hashes[nhashes] = NULL; # 502| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bmz.c:500:40: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)(nhashes + 1) * 8’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bmz.c:500:40: note: heap-based allocation # 498| mphf->data = bmz; # 499| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 500|-> bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 501| bmz->hashes[nhashes] = NULL; # 502| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-823): glib-2.80.0/girepository/cmph/bmz.c:501:30: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking # 499| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 500| bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 501|-> bmz->hashes[nhashes] = NULL; # 502| DEBUGP("Reading %u hashes\n", nhashes); # 503| for (i = 0; i < nhashes; ++i) Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:506:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 504| { # 505| hash_state_t *state = NULL; # 506|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 507| DEBUGP("Hash state has %u bytes\n", buflen); # 508| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bmz.c:508:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bmz.c:508:31: note: heap-based allocation # 506| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 507| DEBUGP("Hash state has %u bytes\n", buflen); # 508|-> buf = (char *)malloc((size_t)buflen); # 509| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 510| state = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:509:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 507| DEBUGP("Hash state has %u bytes\n", buflen); # 508| buf = (char *)malloc((size_t)buflen); # 509|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 510| state = hash_state_load(buf, buflen); # 511| bmz->hashes[i] = state; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:516:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 514| # 515| DEBUGP("Reading m and n\n"); # 516|-> nbytes = fread(&(bmz->n), sizeof(cmph_uint32), (size_t)1, f); # 517| nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f); # 518| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/cmph/bmz.c:516:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 514| # 515| DEBUGP("Reading m and n\n"); # 516|-> nbytes = fread(&(bmz->n), sizeof(cmph_uint32), (size_t)1, f); # 517| nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f); # 518| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz.c:517:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 515| DEBUGP("Reading m and n\n"); # 516| nbytes = fread(&(bmz->n), sizeof(cmph_uint32), (size_t)1, f); # 517|-> nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f); # 518| # 519| bmz->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*bmz->n); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz8.c: scope_hint: In function ‘bmz8_new’ glib-2.80.0/girepository/cmph/bmz8.c:83:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bmz8.hashes + (long unsigned int)i * 8’ # 81| # 82| bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3); # 83|-> for(i = 0; i < 3; ++i) bmz8->hashes[i] = NULL; # 84| # 85| do Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bmz8.c:142:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visited’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 140| DEBUGP("Searching step\n"); # 141| visited = (cmph_uint8 *)malloc((size_t)bmz8->n/8 + 1); # 142|-> memset(visited, 0, (size_t)bmz8->n/8 + 1); # 143| used_edges = (cmph_uint8 *)malloc((size_t)bmz8->m/8 + 1); # 144| memset(used_edges, 0, (size_t)bmz8->m/8 + 1); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/bmz8.c:144:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘used_edges’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 142| memset(visited, 0, (size_t)bmz8->n/8 + 1); # 143| used_edges = (cmph_uint8 *)malloc((size_t)bmz8->m/8 + 1); # 144|-> memset(used_edges, 0, (size_t)bmz8->m/8 + 1); # 145| free(bmz8->g); # 146| bmz8->g = (cmph_uint8 *)calloc((size_t)bmz8->n, sizeof(cmph_uint8)); Error: CPPCHECK_WARNING (CWE-401): glib-2.80.0/girepository/cmph/bmz8.c:330: error[memleakOnRealloc]: Common realloc mistake: 'unused_g_values' nulled but not freed upon failure # 328| if(nunused_g_values == unused_g_values_capacity) # 329| { # 330|-> unused_g_values = (cmph_uint8*)realloc(unused_g_values, ((size_t)(unused_g_values_capacity + BUFSIZ))*sizeof(cmph_uint8)); # 331| unused_g_values_capacity += (cmph_uint8)BUFSIZ; # 332| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz8.c: scope_hint: In function ‘bmz8_traverse_critical_nodes_heuristic’ glib-2.80.0/girepository/cmph/bmz8.c:333:85: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘unused_g_values’ glib-2.80.0/girepository/cmph/bmz8.c:7: included_from: Included from here. glib-2.80.0/girepository/cmph/bmz8.c:319:61: note: in expansion of macro ‘GETBIT’ # 331| unused_g_values_capacity += (cmph_uint8)BUFSIZ; # 332| } # 333|-> unused_g_values[nunused_g_values++] = next_g; # 334| # 335| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:468:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 466| __cmph_dump(mphf, fd); # 467| # 468|-> nbytes = fwrite(&two, sizeof(cmph_uint8), (size_t)1, fd); # 469| # 470| hash_state_dump(data->hashes[0], &buf, &buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:472:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 470| hash_state_dump(data->hashes[0], &buf, &buflen); # 471| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 472|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 473| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 474| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:473:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 471| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 472| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 473|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 474| free(buf); # 475| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:478:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 476| hash_state_dump(data->hashes[1], &buf, &buflen); # 477| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 478|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 479| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 480| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:479:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 477| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 478| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 479|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 480| free(buf); # 481| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:482:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 480| free(buf); # 481| # 482|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint8), (size_t)1, fd); # 483| nbytes = fwrite(&(data->m), sizeof(cmph_uint8), (size_t)1, fd); # 484| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:483:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 481| # 482| nbytes = fwrite(&(data->n), sizeof(cmph_uint8), (size_t)1, fd); # 483|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint8), (size_t)1, fd); # 484| # 485| nbytes = fwrite(data->g, sizeof(cmph_uint8)*(data->n), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:509:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 507| DEBUGP("Loading bmz8 mphf\n"); # 508| mphf->data = bmz8; # 509|-> nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f); # 510| bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1)); # 511| bmz8->hashes[nhashes] = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/bmz8.c: scope_hint: In function ‘bmz8_load’ glib-2.80.0/girepository/cmph/bmz8.c:510:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bmz8’ # 508| mphf->data = bmz8; # 509| nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f); # 510|-> bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1)); # 511| bmz8->hashes[nhashes] = NULL; # 512| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bmz8.c:510:41: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)((int)nhashes + 1) * 8’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bmz8.c:510:41: note: heap-based allocation # 508| mphf->data = bmz8; # 509| nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f); # 510|-> bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1)); # 511| bmz8->hashes[nhashes] = NULL; # 512| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-823): glib-2.80.0/girepository/cmph/bmz8.c:511:31: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking # 509| nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f); # 510| bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1)); # 511|-> bmz8->hashes[nhashes] = NULL; # 512| DEBUGP("Reading %u hashes\n", nhashes); # 513| for (i = 0; i < nhashes; ++i) Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:516:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 514| { # 515| hash_state_t *state = NULL; # 516|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 517| DEBUGP("Hash state has %u bytes\n", buflen); # 518| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/bmz8.c:518:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/bmz8.c:518:31: note: heap-based allocation # 516| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 517| DEBUGP("Hash state has %u bytes\n", buflen); # 518|-> buf = (char *)malloc((size_t)buflen); # 519| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 520| state = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:519:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 517| DEBUGP("Hash state has %u bytes\n", buflen); # 518| buf = (char *)malloc((size_t)buflen); # 519|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 520| state = hash_state_load(buf, buflen); # 521| bmz8->hashes[i] = state; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:526:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 524| # 525| DEBUGP("Reading m and n\n"); # 526|-> nbytes = fread(&(bmz8->n), sizeof(cmph_uint8), (size_t)1, f); # 527| nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f); # 528| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/cmph/bmz8.c:526:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 524| # 525| DEBUGP("Reading m and n\n"); # 526|-> nbytes = fread(&(bmz8->n), sizeof(cmph_uint8), (size_t)1, f); # 527| nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f); # 528| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/bmz8.c:527:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 525| DEBUGP("Reading m and n\n"); # 526| nbytes = fread(&(bmz8->n), sizeof(cmph_uint8), (size_t)1, f); # 527|-> nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f); # 528| # 529| bmz8->g = (cmph_uint8 *)malloc(sizeof(cmph_uint8)*bmz8->n); Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/brz.c: scope_hint: In function ‘brz_new’ glib-2.80.0/girepository/cmph/brz.c:153:38: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/brz.c:153:38: note: only use operands of an integer type inside the size argument # 151| brz->k = (cmph_uint32)ceil(brz->m/((double)brz->b)); # 152| DEBUGP("k: %u\n", brz->k); # 153|-> brz->size = (cmph_uint8 *) calloc((size_t)brz->k, sizeof(cmph_uint8)); # 154| # 155| // Clustering the keys by graph id. Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c: scope_hint: In function ‘brz_gen_mphf’ glib-2.80.0/girepository/cmph/brz.c:263:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buckets_size’ # 261| fprintf(stderr, "Flushing %u\n", nkeys_in_buffer); # 262| } # 263|-> value = buckets_size[0]; # 264| sum = 0; # 265| keylen1 = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/brz.c:286:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘filename’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null # 284| } # 285| filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char)); # 286|-> sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes); # 287| tmp_fd = fopen(filename, "wb"); # 288| free(filename); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:292:69: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_index’ # 290| for(i = 0; i < nkeys_in_buffer; i++) # 291| { # 292|-> memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 293| nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 294| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:293:5: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 291| { # 292| memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 293|-> nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 294| } # 295| nkeys_in_buffer = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/brz.c:293:42: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected glib-2.80.0/girepository/cmph/cmph.h:5: included_from: Included from here. glib-2.80.0/girepository/cmph/fch.h:4: included_from: Included from here. glib-2.80.0/girepository/cmph/brz.c:2: included_from: Included from here. /usr/include/stdio.h:745:15: note: argument 4 of ‘fwrite’ must be non-null # 291| { # 292| memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 293|-> nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 294| } # 295| nkeys_in_buffer = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/brz.c:300:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected /usr/include/stdio.h:184:12: note: argument 1 of ‘fclose’ must be non-null # 298| nflushes++; # 299| free(keys_index); # 300|-> fclose(tmp_fd); # 301| } # 302| memcpy(buffer + memory_usage, &keylen, sizeof(keylen)); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:302:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer’ # 300| fclose(tmp_fd); # 301| } # 302|-> memcpy(buffer + memory_usage, &keylen, sizeof(keylen)); # 303| memcpy(buffer + memory_usage + sizeof(keylen), key, (size_t)keylen); # 304| memory_usage += keylen + (cmph_uint32)sizeof(keylen); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:326:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buckets_size’ # 324| fprintf(stderr, "Flushing %u\n", nkeys_in_buffer); # 325| } # 326|-> value = buckets_size[0]; # 327| sum = 0; # 328| keylen1 = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/brz.c:348:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘filename’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null # 346| } # 347| filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char)); # 348|-> sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes); # 349| tmp_fd = fopen(filename, "wb"); # 350| free(filename); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:354:61: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_index’ # 352| for(i = 0; i < nkeys_in_buffer; i++) # 353| { # 354|-> memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 355| nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 356| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:355:4: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 353| { # 354| memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 355|-> nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 356| } # 357| nkeys_in_buffer = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/brz.c:355:34: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected /usr/include/stdio.h:745:15: note: argument 4 of ‘fwrite’ must be non-null # 353| { # 354| memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1)); # 355|-> nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 356| } # 357| nkeys_in_buffer = 0; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:357:3: warning[deadcode.DeadStores]: Value stored to 'nkeys_in_buffer' is never read # 355| nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd); # 356| } # 357|-> nkeys_in_buffer = 0; # 358| memory_usage = 0; # 359| memset((void *)buckets_size, 0, brz->k*sizeof(cmph_uint32)); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:358:3: warning[deadcode.DeadStores]: Value stored to 'memory_usage' is never read # 356| } # 357| nkeys_in_buffer = 0; # 358|-> memory_usage = 0; # 359| memset((void *)buckets_size, 0, brz->k*sizeof(cmph_uint32)); # 360| nflushes++; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:374:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 372| } # 373| /* Starting to dump to disk the resultant MPHF: __cmph_dump function */ # 374|-> nbytes = fwrite(cmph_names[CMPH_BRZ], (size_t)(strlen(cmph_names[CMPH_BRZ]) + 1), (size_t)1, brz->mphf_fd); # 375| nbytes = fwrite(&(brz->m), sizeof(brz->m), (size_t)1, brz->mphf_fd); # 376| nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:375:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 373| /* Starting to dump to disk the resultant MPHF: __cmph_dump function */ # 374| nbytes = fwrite(cmph_names[CMPH_BRZ], (size_t)(strlen(cmph_names[CMPH_BRZ]) + 1), (size_t)1, brz->mphf_fd); # 375|-> nbytes = fwrite(&(brz->m), sizeof(brz->m), (size_t)1, brz->mphf_fd); # 376| nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd); # 377| nbytes = fwrite(&(brz->algo), sizeof(brz->algo), (size_t)1, brz->mphf_fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:376:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 374| nbytes = fwrite(cmph_names[CMPH_BRZ], (size_t)(strlen(cmph_names[CMPH_BRZ]) + 1), (size_t)1, brz->mphf_fd); # 375| nbytes = fwrite(&(brz->m), sizeof(brz->m), (size_t)1, brz->mphf_fd); # 376|-> nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd); # 377| nbytes = fwrite(&(brz->algo), sizeof(brz->algo), (size_t)1, brz->mphf_fd); # 378| nbytes = fwrite(&(brz->k), sizeof(cmph_uint32), (size_t)1, brz->mphf_fd); // number of MPHFs Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:377:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 375| nbytes = fwrite(&(brz->m), sizeof(brz->m), (size_t)1, brz->mphf_fd); # 376| nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd); # 377|-> nbytes = fwrite(&(brz->algo), sizeof(brz->algo), (size_t)1, brz->mphf_fd); # 378| nbytes = fwrite(&(brz->k), sizeof(cmph_uint32), (size_t)1, brz->mphf_fd); // number of MPHFs # 379| nbytes = fwrite(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, brz->mphf_fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:378:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 376| nbytes = fwrite(&(brz->c), sizeof(double), (size_t)1, brz->mphf_fd); # 377| nbytes = fwrite(&(brz->algo), sizeof(brz->algo), (size_t)1, brz->mphf_fd); # 378|-> nbytes = fwrite(&(brz->k), sizeof(cmph_uint32), (size_t)1, brz->mphf_fd); // number of MPHFs # 379| nbytes = fwrite(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, brz->mphf_fd); # 380| if (nbytes == 0 && ferror(brz->mphf_fd)) { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:390:2: warning[deadcode.DeadStores]: Value stored to 'memory_usage' is never read # 388| buffer_h0 = (cmph_uint32 *)calloc((size_t)nflushes, sizeof(cmph_uint32)); # 389| # 390|-> memory_usage = 0; # 391| for(i = 0; i < nflushes; i++) # 392| { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:411:16: warning[unix.Malloc]: Use of memory allocated with size zero # 409| { # 410| i = brz_min_index(buffer_h0, nflushes); # 411|-> cur_bucket = buffer_h0[i]; # 412| key = (char *)buffer_manager_read_key(buff_manager, i, &keylen); # 413| if(key) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:411:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_h0’ # 409| { # 410| i = brz_min_index(buffer_h0, nflushes); # 411|-> cur_bucket = buffer_h0[i]; # 412| key = (char *)buffer_manager_read_key(buff_manager, i, &keylen); # 413| if(key) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:420:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’ # 418| h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k; # 419| if (h0 != buffer_h0[i]) break; # 420|-> keys_vd[nkeys_vd++] = (cmph_uint8 *)key; # 421| key = NULL; //transfer memory ownership # 422| e++; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:428:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’ glib-2.80.0/girepository/cmph/brz.c:17: included_from: Included from here. # 426| { # 427| assert(nkeys_vd < brz->size[cur_bucket]); # 428|-> keys_vd[nkeys_vd++] = buffer_merge[i]; # 429| buffer_merge[i] = NULL; //transfer memory ownership # 430| e++; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:428:67: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_merge’ # 426| { # 427| assert(nkeys_vd < brz->size[cur_bucket]); # 428|-> keys_vd[nkeys_vd++] = buffer_merge[i]; # 429| buffer_merge[i] = NULL; //transfer memory ownership # 430| e++; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:438:45: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’ # 436| { # 437| assert(nkeys_vd < brz->size[cur_bucket]); # 438|-> keys_vd[nkeys_vd++] = buffer_merge[i]; # 439| buffer_merge[i] = NULL; //transfer memory ownership # 440| e++; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c:438:59: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_merge’ # 436| { # 437| assert(nkeys_vd < brz->size[cur_bucket]); # 438|-> keys_vd[nkeys_vd++] = buffer_merge[i]; # 439| buffer_merge[i] = NULL; //transfer memory ownership # 440| e++; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:492:11: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 490| default: assert(0); # 491| } # 492|-> nbytes = fwrite(bufmphf, (size_t)buflenmphf, (size_t)1, brz->mphf_fd); # 493| free(bufmphf); # 494| bufmphf = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c: scope_hint: In function ‘brz_copy_partial_fch_mphf’ glib-2.80.0/girepository/cmph/brz.c:539:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ # 537| *buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32); # 538| buf = (char *)malloc((size_t)(*buflen)); # 539|-> memcpy(buf, &buflenh1, sizeof(cmph_uint32)); # 540| memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1); # 541| memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32)); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c: scope_hint: In function ‘brz_copy_partial_bmz8_mphf’ glib-2.80.0/girepository/cmph/brz.c:560:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ # 558| *buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32); # 559| buf = (char *)malloc((size_t)(*buflen)); # 560|-> memcpy(buf, &buflenh1, sizeof(cmph_uint32)); # 561| memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1); # 562| memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32)); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:582:9: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 580| hash_state_dump(data->h0, &buf, &buflen); # 581| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 582|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 583| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 584| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:583:9: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 581| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 582| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 583|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 584| free(buf); # 585| // Dumping m and the vector offset. Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:586:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 584| free(buf); # 585| // Dumping m and the vector offset. # 586|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 587| nbytes = fwrite(data->offset, sizeof(cmph_uint32)*(data->k), (size_t)1, fd); # 588| if (nbytes == 0 && ferror(fd)) { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:605:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 603| DEBUGP("Loading brz mphf\n"); # 604| mphf->data = brz; # 605|-> nbytes = fread(&(brz->c), sizeof(double), (size_t)1, f); # 606| nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo. # 607| nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:606:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 604| mphf->data = brz; # 605| nbytes = fread(&(brz->c), sizeof(double), (size_t)1, f); # 606|-> nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo. # 607| nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f); # 608| brz->size = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:607:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 605| nbytes = fread(&(brz->c), sizeof(double), (size_t)1, f); # 606| nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo. # 607|-> nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f); # 608| brz->size = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k); # 609| nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/brz.c: scope_hint: In function ‘brz_load’ glib-2.80.0/girepository/cmph/brz.c:608:67: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘brz’ # 606| nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo. # 607| nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f); # 608|-> brz->size = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k); # 609| nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f); # 610| brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:609:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 607| nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f); # 608| brz->size = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k); # 609|-> nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f); # 610| brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k); # 611| brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:618:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 616| { # 617| // h1 # 618|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 619| DEBUGP("Hash state 1 has %u bytes\n", buflen); # 620| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/brz.c:620:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/brz.c:620:31: note: heap-based allocation # 618| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 619| DEBUGP("Hash state 1 has %u bytes\n", buflen); # 620|-> buf = (char *)malloc((size_t)buflen); # 621| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 622| brz->h1[i] = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:621:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 619| DEBUGP("Hash state 1 has %u bytes\n", buflen); # 620| buf = (char *)malloc((size_t)buflen); # 621|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 622| brz->h1[i] = hash_state_load(buf, buflen); # 623| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:625:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 623| free(buf); # 624| //h2 # 625|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 626| DEBUGP("Hash state 2 has %u bytes\n", buflen); # 627| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/brz.c:627:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/brz.c:627:31: note: heap-based allocation # 625| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 626| DEBUGP("Hash state 2 has %u bytes\n", buflen); # 627|-> buf = (char *)malloc((size_t)buflen); # 628| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 629| brz->h2[i] = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:628:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 626| DEBUGP("Hash state 2 has %u bytes\n", buflen); # 627| buf = (char *)malloc((size_t)buflen); # 628|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 629| brz->h2[i] = hash_state_load(buf, buflen); # 630| free(buf); Error: GCC_ANALYZER_WARNING: glib-2.80.0/girepository/cmph/brz.c:642:43: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results glib-2.80.0/girepository/cmph/brz.c:642:43: note: only use operands of an integer type inside the size argument # 640| } # 641| DEBUGP("g_i has %u bytes\n", n); # 642|-> brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8)); # 643| nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f); # 644| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:643:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 641| DEBUGP("g_i has %u bytes\n", n); # 642| brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8)); # 643|-> nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f); # 644| } # 645| //loading h0 Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/cmph/brz.c:643:35: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)n, 1)’ # 641| DEBUGP("g_i has %u bytes\n", n); # 642| brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8)); # 643|-> nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f); # 644| } # 645| //loading h0 Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:646:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 644| } # 645| //loading h0 # 646|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 647| DEBUGP("Hash state has %u bytes\n", buflen); # 648| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/brz.c:648:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/brz.c:648:23: note: heap-based allocation # 646| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 647| DEBUGP("Hash state has %u bytes\n", buflen); # 648|-> buf = (char *)malloc((size_t)buflen); # 649| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 650| brz->h0 = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:649:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 647| DEBUGP("Hash state has %u bytes\n", buflen); # 648| buf = (char *)malloc((size_t)buflen); # 649|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 650| brz->h0 = hash_state_load(buf, buflen); # 651| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:654:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 652| # 653| //loading c, m, and the vector offset. # 654|-> nbytes = fread(&(brz->m), sizeof(cmph_uint32), (size_t)1, f); # 655| brz->offset = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*brz->k); # 656| nbytes = fread(brz->offset, sizeof(cmph_uint32)*(brz->k), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:702:2: warning[deadcode.DeadStores]: Value stored to 'mphf_bucket' is never read # 700| h1 = hash(brz->h1[h0], key, keylen) % m; # 701| h2 = hash(brz->h2[h0], key, keylen) % m; # 702|-> mphf_bucket = 0; # 703| h1 = mixh10h11h12(b, p1, p2, h1); # 704| mphf_bucket = (cmph_uint8)((h2 + brz->g[h0][h1]) % m); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:852:2: warning[deadcode.DeadStores]: Value stored to 'n' is never read # 850| size += hash_state_packed_size(h2_type) * data->k; # 851| # 852|-> n = 0; # 853| for(i = 0; i < data->k; i++) # 854| { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/brz.c:976:2: warning[deadcode.DeadStores]: Value stored to 'mphf_bucket' is never read # 974| h2 = hash_packed(h2_ptr, h2_type, key, keylen) % m; # 975| # 976|-> mphf_bucket = 0; # 977| h1 = mixh10h11h12(b, p1, p2, h1); # 978| mphf_bucket = (cmph_uint8)((h2 + g[h1]) % m); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/buffer_entry.c: scope_hint: In function ‘buffer_entry_read_key’ glib-2.80.0/girepository/cmph/buffer_entry.c:72:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*buffer_entry.buff + (sizetype)*buffer_entry.pos’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 70| buffer_entry_load(buffer_entry); # 71| } # 72|-> memcpy(keylen + copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes); # 73| buffer_entry->pos += lacked_bytes; # 74| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/buffer_entry.c:78:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ # 76| copied_bytes = 0; # 77| buf = (cmph_uint8 *)malloc(*keylen + sizeof(*keylen)); # 78|-> memcpy(buf, keylen, sizeof(*keylen)); # 79| if((buffer_entry->pos + lacked_bytes) > buffer_entry->nbytes) { # 80| copied_bytes = buffer_entry->nbytes - buffer_entry->pos; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/buffer_entry.c:87:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*buffer_entry.buff + (sizetype)*buffer_entry.pos’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 85| buffer_entry_load(buffer_entry); # 86| } # 87|-> memcpy(buf+sizeof(*keylen)+copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes); # 88| buffer_entry->pos += lacked_bytes; # 89| return buf; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/buffer_manager.c: scope_hint: In function ‘buffer_manager_new’ glib-2.80.0/girepository/cmph/buffer_manager.c:28:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)nentries, 8)’ glib-2.80.0/girepository/cmph/buffer_manager.c:4: included_from: Included from here. # 26| for(i = 0; i < buff_manager->nentries; i++) # 27| { # 28|-> buff_manager->buffer_entries[i] = buffer_entry_new(memory_avail_entry); # 29| } # 30| return buff_manager; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd.c: scope_hint: In function ‘chd_new’ glib-2.80.0/girepository/cmph/chd.c:133:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘vals_table’ glib-2.80.0/girepository/cmph/chd.c:13: included_from: Included from here. glib-2.80.0/girepository/cmph/chd.c:131:21: note: in expansion of macro ‘GETBIT32’ # 131| if(!GETBIT32(occup_table, i)) # 132| { # 133|-> vals_table[idx++] = i; # 134| } # 135| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd.c:146:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ # 144| # 145| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 146|-> mphf->algo = mph->algo; # 147| chdf = (chd_data_t *)malloc(sizeof(chd_data_t)); # 148| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd.c:149:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chdf’ # 147| chdf = (chd_data_t *)malloc(sizeof(chd_data_t)); # 148| # 149|-> chdf->packed_cr = packed_cr; # 150| packed_cr = NULL; //transfer memory ownership # 151| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:184:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 182| mphf->data = chd; # 183| # 184|-> nbytes = fread(&chd->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd); # 185| DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size); # 186| chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd.c: scope_hint: In function ‘chd_load’ glib-2.80.0/girepository/cmph/chd.c:186:64: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chd’ # 184| nbytes = fread(&chd->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd); # 185| DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size); # 186|-> chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1); # 187| nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd); # 188| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:187:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 185| DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size); # 186| chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1); # 187|-> nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd); # 188| # 189| nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:189:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 187| nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd); # 188| # 189|-> nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd); # 190| DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size); # 191| chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1); Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/cmph/chd.c:189:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 187| nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd); # 188| # 189|-> nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd); # 190| DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size); # 191| chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:208:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 206| # 207| DEBUGP("Dumping CHD_PH perfect hash function with %u bytes to disk\n", data->packed_chd_phf_size); # 208|-> nbytes = fwrite(&data->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd); # 209| nbytes = fwrite(data->packed_chd_phf, data->packed_chd_phf_size, (size_t)1, fd); # 210| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:209:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 207| DEBUGP("Dumping CHD_PH perfect hash function with %u bytes to disk\n", data->packed_chd_phf_size); # 208| nbytes = fwrite(&data->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd); # 209|-> nbytes = fwrite(data->packed_chd_phf, data->packed_chd_phf_size, (size_t)1, fd); # 210| # 211| DEBUGP("Dumping compressed rank structure with %u bytes to disk\n", data->packed_cr_size); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd.c:212:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 210| # 211| DEBUGP("Dumping compressed rank structure with %u bytes to disk\n", data->packed_cr_size); # 212|-> nbytes = fwrite(&data->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd); # 213| nbytes = fwrite(data->packed_cr, data->packed_cr_size, (size_t)1, fd); # 214| if (nbytes == 0 && ferror(fd)) { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd_ph.c:87:67: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘tmp_map_item’ # 85| register chd_ph_item_t * tmp_item; # 86| register chd_ph_map_item_t * tmp_map_item = map_items + item_idx; # 87|-> register chd_ph_bucket_t * bucket = buckets + tmp_map_item->bucket_num; # 88| tmp_item = items + bucket->items_list; # 89| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/girepository/cmph/chd_ph.c: scope_hint: In function ‘chd_ph_bucket_insert’ glib-2.80.0/girepository/cmph/chd_ph.c:87:67: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmp_map_item.bucket_num’ glib-2.80.0/girepository/cmph/chd_ph.c:6: included_from: Included from here. # 85| register chd_ph_item_t * tmp_item; # 86| register chd_ph_map_item_t * tmp_map_item = map_items + item_idx; # 87|-> register chd_ph_bucket_t * bucket = buckets + tmp_map_item->bucket_num; # 88| tmp_item = items + bucket->items_list; # 89| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd_ph.c: scope_hint: In function ‘chd_ph_mapping’ glib-2.80.0/girepository/cmph/chd_ph.c:248:37: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘map_item’ # 246| # 247| g = hl[0] % chd_ph->nbuckets; # 248|-> map_item->f = hl[1] % chd_ph->n; # 249| map_item->h = hl[2] % (chd_ph->n - 1) + 1; # 250| map_item->bucket_num=g; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:272:4: warning[deadcode.DeadStores]: Value stored to 'map_item' is never read # 270| for(i = 0; i < chd_ph->m; i++) # 271| { # 272|-> map_item = (map_items + i); # 273| if(!chd_ph_bucket_insert(buckets, map_items, items, chd_ph->nbuckets, i)) # 274| break; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd_ph.c: scope_hint: In function ‘chd_ph_ordering’ glib-2.80.0/girepository/cmph/chd_ph.c:314:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sorted_lists’ # 312| sorted_lists[bucket_size].size++; # 313| }; # 314|-> sorted_lists[1].buckets_list = 0; # 315| // Determine final position of list of buckets into the contiguous array that will store all the buckets # 316| for(i = 2; i <= max_bucket_size; i++) Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:349:2: warning[deadcode.DeadStores]: Value stored to 'i' is never read # 347| output_items = (chd_ph_item_t*)calloc(nitems, sizeof(chd_ph_item_t)); # 348| position = 0; # 349|-> i = 0; # 350| for(bucket_size = 1; bucket_size <= max_bucket_size; bucket_size++) # 351| { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:699:40: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'cmph_uint8', which is incompatible with sizeof operand type 'cmph_uint32' # 697| # 698| if(chd_ph->keys_per_bin == 1) # 699|-> chd_ph->occup_table = (cmph_uint8 *) calloc(((chd_ph->n + 31)/32), sizeof(cmph_uint32)); # 700| else # 701| chd_ph->occup_table = (cmph_uint8 *) calloc(chd_ph->n, sizeof(cmph_uint8)); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd_ph.c: scope_hint: In function ‘chd_ph_new’ glib-2.80.0/girepository/cmph/chd_ph.c:808:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ # 806| # 807| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 808|-> mphf->algo = mph->algo; # 809| chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t)); # 810| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chd_ph.c:811:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chd_phf’ # 809| chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t)); # 810| # 811|-> chd_phf->cs = chd_ph->cs; # 812| chd_ph->cs = NULL; //transfer memory ownership # 813| chd_phf->hl = chd_ph->hl; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:848:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 846| mphf->data = chd_ph; # 847| # 848|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 849| DEBUGP("Hash state has %u bytes\n", buflen); # 850| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/chd_ph.c: scope_hint: In function ‘chd_ph_load’ glib-2.80.0/girepository/cmph/chd_ph.c:850:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/chd_ph.c:850:23: note: heap-based allocation # 848| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 849| DEBUGP("Hash state has %u bytes\n", buflen); # 850|-> buf = (char *)malloc((size_t)buflen); # 851| nbytes = fread(buf, (size_t)buflen, (size_t)1, fd); # 852| chd_ph->hl = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:851:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 849| DEBUGP("Hash state has %u bytes\n", buflen); # 850| buf = (char *)malloc((size_t)buflen); # 851|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, fd); # 852| chd_ph->hl = hash_state_load(buf, buflen); # 853| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:855:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 853| free(buf); # 854| # 855|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 856| DEBUGP("Compressed sequence structure has %u bytes\n", buflen); # 857| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/chd_ph.c:857:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/chd_ph.c:857:23: note: heap-based allocation # 855| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 856| DEBUGP("Compressed sequence structure has %u bytes\n", buflen); # 857|-> buf = (char *)malloc((size_t)buflen); # 858| nbytes = fread(buf, (size_t)buflen, (size_t)1, fd); # 859| chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:858:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 856| DEBUGP("Compressed sequence structure has %u bytes\n", buflen); # 857| buf = (char *)malloc((size_t)buflen); # 858|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, fd); # 859| chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); # 860| compressed_seq_load(chd_ph->cs, buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:865:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 863| // loading n and nbuckets # 864| DEBUGP("Reading n and nbuckets\n"); # 865|-> nbytes = fread(&(chd_ph->n), sizeof(cmph_uint32), (size_t)1, fd); # 866| nbytes = fread(&(chd_ph->nbuckets), sizeof(cmph_uint32), (size_t)1, fd); # 867| if (nbytes == 0 && ferror(fd)) { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:884:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 882| hash_state_dump(data->hl, &buf, &buflen); # 883| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 884|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 885| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 886| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:885:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 883| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 884| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 885|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 886| free(buf); # 887| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:890:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 888| compressed_seq_dump(data->cs, &buf, &buflen); # 889| DEBUGP("Dumping compressed sequence structure with %u bytes to disk\n", buflen); # 890|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 891| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 892| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:891:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 889| DEBUGP("Dumping compressed sequence structure with %u bytes to disk\n", buflen); # 890| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 891|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 892| free(buf); # 893| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chd_ph.c:895:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 893| # 894| // dumping n and nbuckets # 895|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 896| nbytes = fwrite(&(data->nbuckets), sizeof(cmph_uint32), (size_t)1, fd); # 897| if (nbytes == 0 && ferror(fd)) { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chm.c: scope_hint: In function ‘chm_new’ glib-2.80.0/girepository/cmph/chm.c:71:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*chm.hashes + (long unsigned int)i * 8’ # 69| # 70| chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3); # 71|-> for(i = 0; i < 3; ++i) chm->hashes[i] = NULL; # 72| //Mapping step # 73| if (mph->verbosity) Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/chm.c:112:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘visited’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 110| DEBUGP("Assignment step\n"); # 111| visited = (cmph_uint8 *)malloc((size_t)(chm->n/8 + 1)); # 112|-> memset(visited, 0, (size_t)(chm->n/8 + 1)); # 113| free(chm->g); # 114| chm->g = (cmph_uint32 *)malloc(chm->n * sizeof(cmph_uint32)); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chm.c:129:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ glib-2.80.0/girepository/cmph/chm.c:11: included_from: Included from here. # 127| # 128| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 129|-> mphf->algo = mph->algo; # 130| chmf = (chm_data_t *)malloc(sizeof(chm_data_t)); # 131| chmf->g = chm->g; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chm.c:131:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chmf’ # 129| mphf->algo = mph->algo; # 130| chmf = (chm_data_t *)malloc(sizeof(chm_data_t)); # 131|-> chmf->g = chm->g; # 132| chm->g = NULL; //transfer memory ownership # 133| chmf->hashes = chm->hashes; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:212:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 210| __cmph_dump(mphf, fd); # 211| # 212|-> nbytes = fwrite(&two, sizeof(cmph_uint32), (size_t)1, fd); # 213| hash_state_dump(data->hashes[0], &buf, &buflen); # 214| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:215:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 213| hash_state_dump(data->hashes[0], &buf, &buflen); # 214| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 215|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 216| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 217| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:216:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 214| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 215| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 216|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 217| free(buf); # 218| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:221:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 219| hash_state_dump(data->hashes[1], &buf, &buflen); # 220| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 221|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 222| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 223| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:222:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 220| DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 221| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 222|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 223| free(buf); # 224| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:225:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 223| free(buf); # 224| # 225|-> nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 226| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 227| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:226:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 224| # 225| nbytes = fwrite(&(data->n), sizeof(cmph_uint32), (size_t)1, fd); # 226|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 227| # 228| nbytes = fwrite(data->g, sizeof(cmph_uint32)*data->n, (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:251:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 249| DEBUGP("Loading chm mphf\n"); # 250| mphf->data = chm; # 251|-> nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 252| chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 253| chm->hashes[nhashes] = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/chm.c: scope_hint: In function ‘chm_load’ glib-2.80.0/girepository/cmph/chm.c:252:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chm’ # 250| mphf->data = chm; # 251| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 252|-> chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 253| chm->hashes[nhashes] = NULL; # 254| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/chm.c:252:40: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)(nhashes + 1) * 8’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/chm.c:252:40: note: heap-based allocation # 250| mphf->data = chm; # 251| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 252|-> chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 253| chm->hashes[nhashes] = NULL; # 254| DEBUGP("Reading %u hashes\n", nhashes); Error: GCC_ANALYZER_WARNING (CWE-823): glib-2.80.0/girepository/cmph/chm.c:253:30: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking # 251| nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f); # 252| chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1)); # 253|-> chm->hashes[nhashes] = NULL; # 254| DEBUGP("Reading %u hashes\n", nhashes); # 255| for (i = 0; i < nhashes; ++i) Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:258:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 256| { # 257| hash_state_t *state = NULL; # 258|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 259| DEBUGP("Hash state has %u bytes\n", buflen); # 260| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/chm.c:260:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/chm.c:260:31: note: heap-based allocation # 258| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 259| DEBUGP("Hash state has %u bytes\n", buflen); # 260|-> buf = (char *)malloc((size_t)buflen); # 261| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 262| state = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:261:3: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 259| DEBUGP("Hash state has %u bytes\n", buflen); # 260| buf = (char *)malloc((size_t)buflen); # 261|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 262| state = hash_state_load(buf, buflen); # 263| chm->hashes[i] = state; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:268:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 266| # 267| DEBUGP("Reading m and n\n"); # 268|-> nbytes = fread(&(chm->n), sizeof(cmph_uint32), (size_t)1, f); # 269| nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f); # 270| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/cmph/chm.c:268:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 266| # 267| DEBUGP("Reading m and n\n"); # 268|-> nbytes = fread(&(chm->n), sizeof(cmph_uint32), (size_t)1, f); # 269| nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f); # 270| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/chm.c:269:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 267| DEBUGP("Reading m and n\n"); # 268| nbytes = fread(&(chm->n), sizeof(cmph_uint32), (size_t)1, f); # 269|-> nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f); # 270| # 271| chm->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*chm->n); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/cmph.c: scope_hint: In function ‘key_byte_vector_read’ glib-2.80.0/girepository/cmph/cmph.c:89:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*key’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 87| size = *keylen; # 88| *key = (char *)malloc(size); # 89|-> memcpy(*key, keys_vd[cmph_vector->position] + sizeof(*keylen), size); # 90| cmph_vector->position = cmph_vector->position + 1; # 91| return (int)(*keylen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/cmph.c: scope_hint: In function ‘key_struct_vector_read’ glib-2.80.0/girepository/cmph/cmph.c:103:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*key’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 101| size = *keylen; # 102| *key = (char *)malloc(size); # 103|-> memcpy(*key, (keys_vd + (cmph_struct_vector->position * cmph_struct_vector->struct_size) + cmph_struct_vector->key_offset), size); # 104| cmph_struct_vector->position = cmph_struct_vector->position + 1; # 105| return (int)(*keylen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/cmph.c: scope_hint: In function ‘key_vector_read’ glib-2.80.0/girepository/cmph/cmph.c:116:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*key’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 114| size = *keylen; # 115| *key = (char *)malloc(size + 1); # 116|-> strcpy(*key, keys_vd[cmph_vector->position]); # 117| cmph_vector->position = cmph_vector->position + 1; # 118| return (int)(*keylen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/cmph_structs.c: scope_hint: In function ‘__config_new’ glib-2.80.0/girepository/cmph/cmph_structs.c:12:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mph’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 10| { # 11| cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t)); # 12|-> memset(mph, 0, sizeof(cmph_config_t)); # 13| if (mph == NULL) return NULL; # 14| mph->key_source = key_source; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/cmph_structs.c:29:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 27| { # 28| register size_t nbytes; # 29|-> nbytes = fwrite(cmph_names[mphf->algo], (size_t)(strlen(cmph_names[mphf->algo]) + 1), (size_t)1, fd); # 30| nbytes = fwrite(&(mphf->size), sizeof(mphf->size), (size_t)1, fd); # 31| if (nbytes == 0 && ferror(fd)) { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/cmph_structs.c: scope_hint: In function ‘__cmph_load’ glib-2.80.0/girepository/cmph/cmph_structs.c:65:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ # 63| } # 64| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 65|-> mphf->algo = algo; # 66| nbytes = fread(&(mphf->size), sizeof(mphf->size), (size_t)1, f); # 67| mphf->data = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/compressed_rank.c: scope_hint: In function ‘compressed_rank_generate’ glib-2.80.0/girepository/cmph/compressed_rank.c:64:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘select_vec’ # 62| j++; # 63| } # 64|-> select_vec[i - 1] = j; # 65| }; # 66| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/compressed_rank.c:188:2: warning[deadcode.DeadStores]: Value stored to 'pos' is never read # 186| } # 187| #endif # 188|-> pos += vals_rems_size; # 189| # 190| DEBUGP("Dumped compressed rank structure with size %u bytes\n", *buflen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/compressed_rank.c: scope_hint: In function ‘compressed_rank_load’ glib-2.80.0/girepository/cmph/compressed_rank.c:238:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*cr.vals_rems’ where non-null expected glib-2.80.0/girepository/cmph/bitbool.h:111:43: note: in definition of macro ‘BITS_TABLE_SIZE’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 236| cr->vals_rems = (cmph_uint32 *) calloc(vals_rems_size, sizeof(cmph_uint32)); # 237| vals_rems_size *= 4; # 238|-> memcpy(cr->vals_rems, buf + pos, vals_rems_size); # 239| # 240| #ifdef DEBUG Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/compressed_rank.c:246:2: warning[deadcode.DeadStores]: Value stored to 'pos' is never read # 244| } # 245| #endif # 246|-> pos += vals_rems_size; # 247| # 248| DEBUGP("Loaded compressed rank structure with size %u bytes\n", buflen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/compressed_rank.c: scope_hint: In function ‘compressed_rank_pack’ glib-2.80.0/girepository/cmph/compressed_rank.c:260:17: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 258| cmph_uint32 buflen = 0; # 259| compressed_rank_dump(cr, &buf, &buflen); # 260|-> memcpy(cr_packed, buf, buflen); # 261| free(buf); # 262| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/compressed_rank.c:284:38: warning[deadcode.DeadStores]: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr' # 282| register cmph_uint32 * bits_vec = sel_packed + 2; // skipping n and m # 283| # 284|-> register cmph_uint32 * vals_rems = (ptr += (buflen_sel >> 2)); # 285| # 286| // compressed sequence query computation Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/compressed_seq.c: scope_hint: In function ‘compressed_seq_generate’ glib-2.80.0/girepository/cmph/compressed_seq.c:60:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lengths’ # 58| if(vals_table[i] == 0) # 59| { # 60|-> lengths[i] = 0; # 61| } # 62| else Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/compressed_seq.c:64:36: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lengths’ # 62| else # 63| { # 64|-> lengths[i] = compressed_seq_i_log2(vals_table[i] + 1); # 65| cs->total_length += lengths[i]; # 66| }; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/compressed_seq.c: scope_hint: In function ‘compressed_seq_load’ glib-2.80.0/girepository/cmph/compressed_seq.c:287:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*cs.length_rems’ where non-null expected glib-2.80.0/girepository/cmph/bitbool.h:111:43: note: in definition of macro ‘BITS_TABLE_SIZE’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 285| cs->length_rems = (cmph_uint32 *) calloc(length_rems_size, sizeof(cmph_uint32)); # 286| length_rems_size *= 4; # 287|-> memcpy(cs->length_rems, buf + pos, length_rems_size); # 288| # 289| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/compressed_seq.c:305:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*cs.store_table’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 303| cs->store_table = (cmph_uint32 *) calloc(store_table_size, sizeof(cmph_uint32)); # 304| store_table_size *= 4; # 305|-> memcpy(cs->store_table, buf + pos, store_table_size); # 306| # 307| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/compressed_seq.c: scope_hint: In function ‘compressed_seq_pack’ glib-2.80.0/girepository/cmph/compressed_seq.c:324:17: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 322| cmph_uint32 buflen = 0; # 323| compressed_seq_dump(cs, &buf, &buflen); # 324|-> memcpy(cs_packed, buf, buflen); # 325| free(buf); # 326| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/compressed_seq.c:356:17: warning[deadcode.DeadStores]: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr' # 354| length_rems = (ptr += (buflen_sel >> 2)); # 355| length_rems_size = BITS_TABLE_SIZE(n, rem_r); # 356|-> store_table = (ptr += length_rems_size); # 357| # 358| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘check_for_collisions_h2’ glib-2.80.0/girepository/cmph/fch.c:132:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘hashtable’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 130| { # 131| cmph_uint32 nkeys = fch_buckets_get_size(buckets, sorted_indexes[i]); # 132|-> memset(hashtable, 0, (size_t)fch->m); # 133| //DEBUGP("bucket %u -- nkeys: %u\n", i, nkeys); # 134| for (j = 0; j < nkeys; j++) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘searching’ glib-2.80.0/girepository/cmph/fch.c:177:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’ # 175| for(i = 0; i < fch->m; i++) # 176| { # 177|-> random_table[i] = i; # 178| } # 179| permut(random_table, fch->m); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c:182:39: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’ # 180| for(i = 0; i < fch->m; i++) # 181| { # 182|-> map_table[random_table[i]] = i; # 183| } # 184| do { Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:212:43: warning[unix.Malloc]: Use of memory allocated with size zero # 210| counter = 0; # 211| restart = 0; // false # 212|-> fch->g[sorted_indexes[i]] = (fch->m + random_table[filled_count + z] - h2) % fch->m; # 213| //DEBUGP("g[%u]: %u\n", sorted_indexes[i], fch->g[sorted_indexes[i]]); # 214| j = INDEX; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c:212:83: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’ # 210| counter = 0; # 211| restart = 0; // false # 212|-> fch->g[sorted_indexes[i]] = (fch->m + random_table[filled_count + z] - h2) % fch->m; # 213| //DEBUGP("g[%u]: %u\n", sorted_indexes[i], fch->g[sorted_indexes[i]]); # 214| j = INDEX; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:235:7: warning[deadcode.DeadStores]: Value stored to 'counter' is never read # 233| restart = 1; // true # 234| filled_count = filled_count - counter; # 235|-> counter = 0; # 236| break; # 237| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘fch_new’ glib-2.80.0/girepository/cmph/fch.c:294:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’ glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘fch_new’ # 292| if (iterations == 0) return NULL; # 293| mphf = (cmph_t *)malloc(sizeof(cmph_t)); # 294|-> mphf->algo = mph->algo; # 295| fchf = (fch_data_t *)malloc(sizeof(fch_data_t)); # 296| fchf->g = fch->g; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c:296:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fchf’ glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘fch_new’ # 294| mphf->algo = mph->algo; # 295| fchf = (fch_data_t *)malloc(sizeof(fch_data_t)); # 296|-> fchf->g = fch->g; # 297| fch->g = NULL; //transfer memory ownership # 298| fchf->h1 = fch->h1; Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:332:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 330| hash_state_dump(data->h1, &buf, &buflen); # 331| //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 332|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 333| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 334| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:333:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 331| //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 332| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 333|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 334| free(buf); # 335| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:338:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 336| hash_state_dump(data->h2, &buf, &buflen); # 337| //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 338|-> nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 339| nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 340| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:339:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 337| //DEBUGP("Dumping hash state with %u bytes to disk\n", buflen); # 338| nbytes = fwrite(&buflen, sizeof(cmph_uint32), (size_t)1, fd); # 339|-> nbytes = fwrite(buf, (size_t)buflen, (size_t)1, fd); # 340| free(buf); # 341| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:342:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 340| free(buf); # 341| # 342|-> nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 343| nbytes = fwrite(&(data->c), sizeof(double), (size_t)1, fd); # 344| nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:343:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 341| # 342| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 343|-> nbytes = fwrite(&(data->c), sizeof(double), (size_t)1, fd); # 344| nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd); # 345| nbytes = fwrite(&(data->p1), sizeof(double), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:344:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 342| nbytes = fwrite(&(data->m), sizeof(cmph_uint32), (size_t)1, fd); # 343| nbytes = fwrite(&(data->c), sizeof(double), (size_t)1, fd); # 344|-> nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd); # 345| nbytes = fwrite(&(data->p1), sizeof(double), (size_t)1, fd); # 346| nbytes = fwrite(&(data->p2), sizeof(double), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:345:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 343| nbytes = fwrite(&(data->c), sizeof(double), (size_t)1, fd); # 344| nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd); # 345|-> nbytes = fwrite(&(data->p1), sizeof(double), (size_t)1, fd); # 346| nbytes = fwrite(&(data->p2), sizeof(double), (size_t)1, fd); # 347| nbytes = fwrite(data->g, sizeof(cmph_uint32)*(data->b), (size_t)1, fd); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:346:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 344| nbytes = fwrite(&(data->b), sizeof(cmph_uint32), (size_t)1, fd); # 345| nbytes = fwrite(&(data->p1), sizeof(double), (size_t)1, fd); # 346|-> nbytes = fwrite(&(data->p2), sizeof(double), (size_t)1, fd); # 347| nbytes = fwrite(data->g, sizeof(cmph_uint32)*(data->b), (size_t)1, fd); # 348| if (nbytes == 0 && ferror(fd)) { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/fch.c: scope_hint: In function ‘fch_load’ glib-2.80.0/girepository/cmph/fch.c:373:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fch’ # 371| mphf->data = fch; # 372| //DEBUGP("Reading h1\n"); # 373|-> fch->h1 = NULL; # 374| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 375| //DEBUGP("Hash state of h1 has %u bytes\n", buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:374:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 372| //DEBUGP("Reading h1\n"); # 373| fch->h1 = NULL; # 374|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 375| //DEBUGP("Hash state of h1 has %u bytes\n", buflen); # 376| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/fch.c:376:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/fch.c:376:23: note: heap-based allocation # 374| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 375| //DEBUGP("Hash state of h1 has %u bytes\n", buflen); # 376|-> buf = (char *)malloc((size_t)buflen); # 377| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 378| fch->h1 = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:377:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 375| //DEBUGP("Hash state of h1 has %u bytes\n", buflen); # 376| buf = (char *)malloc((size_t)buflen); # 377|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 378| fch->h1 = hash_state_load(buf, buflen); # 379| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:385:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 383| //DEBUGP("Reading h2\n"); # 384| fch->h2 = NULL; # 385|-> nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 386| //DEBUGP("Hash state of h2 has %u bytes\n", buflen); # 387| buf = (char *)malloc((size_t)buflen); Error: GCC_ANALYZER_WARNING (CWE-789): glib-2.80.0/girepository/cmph/fch.c:387:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking glib-2.80.0/girepository/cmph/fch.c:387:23: note: heap-based allocation # 385| nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f); # 386| //DEBUGP("Hash state of h2 has %u bytes\n", buflen); # 387|-> buf = (char *)malloc((size_t)buflen); # 388| nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 389| fch->h2 = hash_state_load(buf, buflen); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:388:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 386| //DEBUGP("Hash state of h2 has %u bytes\n", buflen); # 387| buf = (char *)malloc((size_t)buflen); # 388|-> nbytes = fread(buf, (size_t)buflen, (size_t)1, f); # 389| fch->h2 = hash_state_load(buf, buflen); # 390| free(buf); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:394:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 392| # 393| //DEBUGP("Reading m and n\n"); # 394|-> nbytes = fread(&(fch->m), sizeof(cmph_uint32), (size_t)1, f); # 395| nbytes = fread(&(fch->c), sizeof(double), (size_t)1, f); # 396| nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:395:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 393| //DEBUGP("Reading m and n\n"); # 394| nbytes = fread(&(fch->m), sizeof(cmph_uint32), (size_t)1, f); # 395|-> nbytes = fread(&(fch->c), sizeof(double), (size_t)1, f); # 396| nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f); # 397| nbytes = fread(&(fch->p1), sizeof(double), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:396:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 394| nbytes = fread(&(fch->m), sizeof(cmph_uint32), (size_t)1, f); # 395| nbytes = fread(&(fch->c), sizeof(double), (size_t)1, f); # 396|-> nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f); # 397| nbytes = fread(&(fch->p1), sizeof(double), (size_t)1, f); # 398| nbytes = fread(&(fch->p2), sizeof(double), (size_t)1, f); Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:397:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 395| nbytes = fread(&(fch->c), sizeof(double), (size_t)1, f); # 396| nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f); # 397|-> nbytes = fread(&(fch->p1), sizeof(double), (size_t)1, f); # 398| nbytes = fread(&(fch->p2), sizeof(double), (size_t)1, f); # 399| Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/fch.c:398:2: warning[deadcode.DeadStores]: Value stored to 'nbytes' is never read # 396| nbytes = fread(&(fch->b), sizeof(cmph_uint32), (size_t)1, f); # 397| nbytes = fread(&(fch->p1), sizeof(double), (size_t)1, f); # 398|-> nbytes = fread(&(fch->p2), sizeof(double), (size_t)1, f); # 399| # 400| fch->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*fch->b); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/graph.c: scope_hint: In function ‘graph_clear_edges’ glib-2.80.0/girepository/cmph/graph.c:165:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.first + (long unsigned int)i * 4’ # 163| { # 164| cmph_uint32 i; # 165|-> for (i = 0; i < g->nnodes; ++i) g->first[i] = EMPTY; # 166| for (i = 0; i < g->nedges*2; ++i) # 167| { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/graph.c:168:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.edges + (long unsigned int)i * 4’ # 166| for (i = 0; i < g->nedges*2; ++i) # 167| { # 168|-> g->edges[i] = EMPTY; # 169| g->next[i] = EMPTY; # 170| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/graph.c:169:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.next + (long unsigned int)i * 4’ # 167| { # 168| g->edges[i] = EMPTY; # 169|-> g->next[i] = EMPTY; # 170| } # 171| g->cedges = 0; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/graph.c: scope_hint: In function ‘graph_is_cyclic’ glib-2.80.0/girepository/cmph/graph.c:234:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘deleted’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 232| cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8 + 1); # 233| size_t deleted_len = g->nedges/8 + 1; # 234|-> memset(deleted, 0, deleted_len); # 235| # 236| DEBUGP("Looking for cycles in graph with %u vertices and %u edges\n", g->nnodes, g->nedges); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/graph.c: scope_hint: In function ‘graph_obtain_critical_nodes’ glib-2.80.0/girepository/cmph/graph.c:265:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘deleted’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 263| cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8+1); # 264| size_t deleted_len = g->nedges/8 + 1; # 265|-> memset(deleted, 0, deleted_len); # 266| free(g->critical_nodes); # 267| g->critical_nodes = (cmph_uint8 *)malloc((g->nnodes*sizeof(cmph_uint8))/8 + 1); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/graph.c:269:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*g.critical_nodes’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 267| g->critical_nodes = (cmph_uint8 *)malloc((g->nnodes*sizeof(cmph_uint8))/8 + 1); # 268| g->ncritical_nodes = 0; # 269|-> memset(g->critical_nodes, 0, (g->nnodes*sizeof(cmph_uint8))/8 + 1); # 270| DEBUGP("Looking for the 2-core in graph with %u vertices and %u edges\n", g->nnodes, g->nedges); # 271| for (v = 0; v < g->nnodes; ++v) Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/hash.c: scope_hint: In function ‘hash_state_dump’ glib-2.80.0/girepository/cmph/hash.c:68:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*buf’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 66| } # 67| *buf = (char *)malloc(strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen); # 68|-> memcpy(*buf, cmph_hash_names[state->hashfunc], strlen(cmph_hash_names[state->hashfunc]) + 1); # 69| DEBUGP("Algobuf is %u\n", *(cmph_uint32 *)algobuf); # 70| len = *buflen; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/jenkins_hash.c: scope_hint: In function ‘jenkins_state_new’ glib-2.80.0/girepository/cmph/jenkins_hash.c:91:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’ # 89| jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t)); # 90| DEBUGP("Initializing jenkins hash\n"); # 91|-> state->seed = ((cmph_uint32)rand() % size); # 92| return state; # 93| } Error: CLANG_WARNING: glib-2.80.0/girepository/cmph/jenkins_hash.c:223:17: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'cmph_uint32' # 221| { # 222| *buflen = sizeof(cmph_uint32); # 223|-> *buf = (char *)malloc(sizeof(cmph_uint32)); # 224| if (!*buf) # 225| { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/jenkins_hash.c: scope_hint: In function ‘jenkins_state_copy’ glib-2.80.0/girepository/cmph/jenkins_hash.c:237:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dest_state’ # 235| { # 236| jenkins_state_t *dest_state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t)); # 237|-> dest_state->hashfunc = src_state->hashfunc; # 238| dest_state->seed = src_state->seed; # 239| return dest_state; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/jenkins_hash.c: scope_hint: In function ‘jenkins_state_load’ glib-2.80.0/girepository/cmph/jenkins_hash.c:245:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’ # 243| { # 244| jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t)); # 245|-> state->seed = *(cmph_uint32 *)buf; # 246| state->hashfunc = CMPH_HASH_JENKINS; # 247| DEBUGP("Loaded jenkins state with seed %u\n", state->seed); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/select.c: scope_hint: In function ‘select_generate_sel_table’ glib-2.80.0/girepository/cmph/select.c:84:65: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’ # 82| { # 83| old_part_sum = part_sum; # 84|-> part_sum += rank_lookup_table[bits_table[vec_idx]]; # 85| vec_idx++; # 86| } while (part_sum <= one_idx); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/cmph/select.c:88:50: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*sel.select_table’ # 86| } while (part_sum <= one_idx); # 87| # 88|-> sel->select_table[sel_table_idx] = select_lookup_table[bits_table[vec_idx - 1]][one_idx - old_part_sum] + ((vec_idx - 1) << 3); // ((vec_idx - 1) << 3) = ((vec_idx - 1) * 8) # 89| one_idx += STEP_SELECT_TABLE ; # 90| sel_table_idx++; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/select.c: scope_hint: In function ‘select_load’ glib-2.80.0/girepository/cmph/select.c:278:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*sel.bits_vec’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 276| sel->select_table = (cmph_uint32 *)calloc(sel_table_size/sizeof(cmph_uint32), sizeof(cmph_uint32)); # 277| # 278|-> memcpy(sel->bits_vec, buf + pos, vec_size); # 279| pos += vec_size; # 280| memcpy(sel->select_table, buf + pos, sel_table_size); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/select.c:280:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*sel.select_table’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 278| memcpy(sel->bits_vec, buf + pos, vec_size); # 279| pos += vec_size; # 280|-> memcpy(sel->select_table, buf + pos, sel_table_size); # 281| # 282| DEBUGP("Loaded select structure with size %u bytes\n", buflen); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/girepository/cmph/select.c: scope_hint: In function ‘select_pack’ glib-2.80.0/girepository/cmph/select.c:298:17: warning[-Wanalyzer-null-argument]: use of NULL ‘buf’ where non-null expected <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 296| cmph_uint32 buflen = 0; # 297| select_dump(sel, &buf, &buflen); # 298|-> memcpy(sel_packed, buf, buflen); # 299| free(buf); # 300| } Error: GCC_ANALYZER_WARNING (CWE-775): glib-2.80.0/girepository/compiler/compiler.c: scope_hint: In function ‘write_out_typelib’ glib-2.80.0/girepository/compiler/compiler.c:131:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’ glib-2.80.0/girepository/compiler/compiler.c:33: included_from: Included from here. glib-2.80.0/girepository/compiler/compiler.c:89:14: note: in expansion of macro ‘g_fopen’ glib-2.80.0/girepository/compiler/compiler.c:25: included_from: Included from here. # 129| g_free (tmp_filename); # 130| # 131|-> return success; # 132| } # 133| Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/girepository/compiler/compiler.c:131:10: warning[-Wanalyzer-malloc-leak]: leak of ‘file’ glib-2.80.0/girepository/compiler/compiler.c:89:14: note: in expansion of macro ‘g_fopen’ # 129| g_free (tmp_filename); # 130| # 131|-> return success; # 132| } # 133| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/girepository/gibaseinfo.c: scope_hint: In function ‘gi_info_from_entry’ glib-2.80.0/girepository/gibaseinfo.c:503:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/girepository/gibaseinfo.c:34: included_from: Included from here. glib-2.80.0/girepository/gibaseinfo.c:489:31: note: in expansion of macro ‘gi_typelib_get_string’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/girepository/gibaseinfo.c:30: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/girepository/gibaseinfo.c:338:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/girepository/gibaseinfo.c:338:3: note: in expansion of macro ‘g_return_val_if_fail’ # 501| entry->offset); # 502| # 503|-> unresolved->name = name; # 504| unresolved->namespace = namespace; # 505| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/girepository/gibaseinfo.c:912: error[uninitvar]: Uninitialized variables: &blob.name, &blob.value # 910| first = (AttributeBlob *) &rinfo->typelib->data[header->attributes]; # 911| # 912|-> res = bsearch (&blob, first, header->n_attributes, # 913| header->attribute_blob_size, cmp_attribute); # 914| Error: CLANG_WARNING: glib-2.80.0/girepository/girffi.c:409:10: warning[unix.Malloc]: Potential leak of memory pointed to by 'atypes' # 407| # 408| atypes = gi_callable_info_get_ffi_arg_types (callable_info, &n_args); # 409|-> status = ffi_prep_cif (cif, FFI_DEFAULT_ABI, n_args, # 410| gi_callable_info_get_ffi_return_type (callable_info), # 411| atypes); Error: CLANG_WARNING: glib-2.80.0/girepository/girmodule.c:572:3: warning[deadcode.DeadStores]: Value stored to 'header' is never read # 570| # 571| data = g_realloc (data, offset2); # 572|-> header = (Header*) data; # 573| # 574| data = add_directory_index_section (data, module, &offset2); Error: CLANG_WARNING: glib-2.80.0/girepository/girnode.c:601:39: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'node') # 599| # 600| g_debug ("node %p type '%s'", node, # 601|-> gi_ir_node_type_to_string (node->type)); # 602| # 603| switch (node->type) Error: CLANG_WARNING: glib-2.80.0/girepository/girparser.c:646:11: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'str') # 644| str += strlen ("Error"); # 645| # 646|-> if (*str == '<') # 647| { # 648| char *tmp, *end; Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/girepository/girparser.c:1625: error[legacyUninitvar]: Uninitialized variable: target_state # 1623| g_assert_not_reached (); # 1624| # 1625|-> if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, target_state)) # 1626| return TRUE; # 1627| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/deprecated/gcompletion.c: scope_hint: In function ‘completion_check_cache’ glib-2.80.0/glib/deprecated/gcompletion.c:254:9: warning[-Wanalyzer-null-argument]: use of NULL ‘*cmp.prefix’ where non-null expected glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/gutils.h:34: included_from: Included from here. glib-2.80.0/glib/gmem.h:34: included_from: Included from here. glib-2.80.0/glib/glist.h:34: included_from: Included from here. glib-2.80.0/glib/deprecated/gcompletion.h:34: included_from: Included from here. glib-2.80.0/glib/deprecated/gcompletion.c:38: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/deprecated/gcompletion.c:359:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/deprecated/gcompletion.c:360:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/deprecated/gcompletion.c:360:3: note: in expansion of macro ‘g_return_val_if_fail’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 252| } # 253| # 254|-> len = strlen(cmp->prefix); # 255| list = cmp->cache; # 256| s = cmp->func ? cmp->func (list->data) : (gchar*) list->data; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/garray.c: scope_hint: In function ‘g_array_new_take’ glib-2.80.0/glib/garray.c:192:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/garray.h:34: included_from: Included from here. glib-2.80.0/glib/garray.c:36: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:186:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:187:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:187:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:188:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:188:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gtestutils.h:28: included_from: Included from here. glib-2.80.0/glib/garray.c:43: included_from: Included from here. glib-2.80.0/glib/garray.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’ # 190| array = g_array_sized_new (FALSE, clear, element_size, 0); # 191| rarray = (GRealArray *) array; # 192|-> rarray->data = (guint8 *) g_steal_pointer (&data); # 193| rarray->len = len; # 194| rarray->elt_capacity = len; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/garray.c: scope_hint: In function ‘g_array_copy’ glib-2.80.0/glib/garray.c:1590:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:1585:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/garray.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/garray.c:339:3: note: in expansion of macro ‘g_return_val_if_fail’ # 1588| (GRealArray *) g_array_sized_new (rarray->zero_terminated, rarray->clear, # 1589| rarray->elt_size, rarray->elt_capacity); # 1590|-> new_rarray->len = rarray->len; # 1591| if (rarray->len > 0) # 1592| memcpy (new_rarray->data, rarray->data, rarray->len * rarray->elt_size); Error: GCC_ANALYZER_WARNING (CWE-835): glib-2.80.0/glib/gthread.h:34: included_from: Included from here. glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/glib/tests/thread-pool.c:26: included_from: Included from here. glib-2.80.0/glib/tests/thread-pool.c: scope_hint: In function ‘test_thread_pool_full’ glib-2.80.0/glib/gatomic.h:114:5: warning[-Wanalyzer-infinite-loop]: infinite loop glib-2.80.0/glib/tests/thread-pool.c:246:14: note: in expansion of macro ‘g_atomic_int_get’ glib-2.80.0/glib/tests/thread-pool.c:246:14: note: in expansion of macro ‘g_atomic_int_get’ glib-2.80.0/glib/tests/thread-pool.c:246:14: note: in expansion of macro ‘g_atomic_int_get’ # 112| gint gaig_temp; \ # 113| (void) (0 ? *(atomic) ^ *(atomic) : 1); \ # 114|-> __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST); \ # 115| (gint) gaig_temp; \ # 116| })) Error: GCC_ANALYZER_WARNING (CWE-835): glib-2.80.0/glib/gthread.h:34: included_from: Included from here. glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/gobject/tests/threadtests.c:29: included_from: Included from here. glib-2.80.0/gobject/tests/threadtests.c: scope_hint: In function ‘on_weak_ref_disposed’ glib-2.80.0/glib/gatomic.h:114:20: warning[-Wanalyzer-infinite-loop]: infinite loop glib-2.80.0/gobject/tests/threadtests.c:364:11: note: in expansion of macro ‘g_atomic_int_get’ glib-2.80.0/gobject/tests/threadtests.c:364:11: note: in expansion of macro ‘g_atomic_int_get’ glib-2.80.0/gobject/tests/threadtests.c:364:11: note: in expansion of macro ‘g_atomic_int_get’ # 112| gint gaig_temp; \ # 113| (void) (0 ? *(atomic) ^ *(atomic) : 1); \ # 114|-> __atomic_load ((gint *)(atomic), &gaig_temp, __ATOMIC_SEQ_CST); \ # 115| (gint) gaig_temp; \ # 116| })) Error: GCC_ANALYZER_WARNING (CWE-835): glib-2.80.0/gio/tests/cancellable.c: scope_hint: In function ‘test_cancellable_disconnect_on_cancelled_callback_hangs’ glib-2.80.0/glib/gatomic.h:131:5: warning[-Wanalyzer-infinite-loop]: infinite loop glib-2.80.0/gio/tests/cancellable.c:545:11: note: in expansion of macro ‘g_atomic_pointer_get’ glib-2.80.0/gio/tests/cancellable.c:545:11: note: in expansion of macro ‘g_atomic_pointer_get’ glib-2.80.0/gio/tests/cancellable.c:545:11: note: in expansion of macro ‘g_atomic_pointer_get’ # 129| glib_typeof (*(atomic)) gapg_temp_newval; \ # 130| glib_typeof ((atomic)) gapg_temp_atomic = (atomic); \ # 131|-> __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ # 132| gapg_temp_newval; \ # 133| })) Error: COMPILER_WARNING (CWE-704): glib-2.80.0/glib/gthread.h:34: included_from: Included from here. glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/glib/tests/atomic.c:14: included_from: Included from here. glib-2.80.0/glib/tests/atomic.c: scope_hint: In function ‘test_types’ glib-2.80.0/glib/gatomic.h:140:5: warning[-Wdiscarded-qualifiers]: argument 2 of ‘__atomic_store’ discards ‘volatile’ qualifier # 140 | __atomic_store (gaps_temp_atomic, &gaps_temp_newval, __ATOMIC_SEQ_CST); \ # | ^~~~~~~~~~~~~~ glib-2.80.0/glib/tests/atomic.c:139:3: note: in expansion of macro ‘g_atomic_pointer_set’ # 139 | g_atomic_pointer_set (&vp_str_vol, NULL); # | ^~~~~~~~~~~~~~~~~~~~ # 138| glib_typeof (*(atomic)) gaps_temp_newval = (newval); \ # 139| (void) (0 ? (gpointer) * (atomic) : NULL); \ # 140|-> __atomic_store (gaps_temp_atomic, &gaps_temp_newval, __ATOMIC_SEQ_CST); \ # 141| })) # 142| #else /* if !(defined(glib_typeof) */ Error: GCC_ANALYZER_WARNING (CWE-775): glib-2.80.0/glib/gbacktrace.c: scope_hint: In function ‘checked_dup’ glib-2.80.0/glib/gbacktrace.c:379:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_fd’ glib-2.80.0/glib/gbacktrace.c:48: included_from: Included from here. glib-2.80.0/glib/glib-unixprivate.h:36: included_from: Included from here. # 377| } # 378| # 379|-> return new_fd; # 380| } # 381| Error: GCC_ANALYZER_WARNING (CWE-1341): glib-2.80.0/glib/gbacktrace.c: scope_hint: In function ‘stack_trace’ glib-2.80.0/glib/gbacktrace.c:432:11: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘2’ # 430| if (old_err != -1) # 431| { # 432|-> close (2); # 433| /* We can ignore the return value here as we're failing anyways */ # 434| (void) !dup (old_err); Error: GCC_ANALYZER_WARNING (CWE-787): glib-2.80.0/gobject/gvalue.c:30: included_from: Included from here. glib-2.80.0/glib/gbsearcharray.h: scope_hint: In function ‘g_bsearch_array_create’ glib-2.80.0/glib/gbsearcharray.h:133:3: warning[-Wanalyzer-out-of-bounds]: buffer overflow glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gtype.h:26: included_from: Included from here. glib-2.80.0/gobject/gvalue.h:28: included_from: Included from here. glib-2.80.0/gobject/gvalue.c:28: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gbsearcharray.h:127:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gbsearcharray.h:131:12: note: in expansion of macro ‘G_BSEARCH_UPPER_POWER2’ glib-2.80.0/glib/gbsearcharray.h:131:12: note: in expansion of macro ‘G_BSEARCH_UPPER_POWER2’ # 131| size = G_BSEARCH_UPPER_POWER2 (size); # 132| barray = (GBSearchArray *) g_malloc (size); # 133|-> memset (barray, 0, sizeof (GBSearchArray)); # 134| # 135| return barray; Error: GCC_ANALYZER_WARNING (CWE-401): glib-2.80.0/glib/gconvert.c: scope_hint: In function ‘g_convert’ glib-2.80.0/glib/gconvert.c:485:6: warning[-Wanalyzer-malloc-leak]: leak of ‘open_converter(to_codeset, from_codeset, error)’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gconvert.c:24: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gconvert.c:479:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gconvert.c:480:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gconvert.c:480:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gconvert.c:481:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gconvert.c:481:3: note: in expansion of macro ‘g_return_val_if_fail’ # 483| cd = open_converter (to_codeset, from_codeset, error); # 484| # 485|-> if (cd == (GIConv) -1) # 486| { # 487| if (bytes_read) Error: GCC_ANALYZER_WARNING (CWE-465): glib-2.80.0/glib/gdataset.c: scope_hint: In function ‘g_dataset_destroy_internal’ glib-2.80.0/glib/gdataset.c:359:10: warning[-Wanalyzer-deref-before-check]: check of ‘dataset’ for NULL after already dereferencing it # 357| # 358| dataset_location = dataset->location; # 359|-> while (dataset) # 360| { # 361| GData *data; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gdataset.c: scope_hint: In function ‘g_data_remove_internal’ glib-2.80.0/glib/gdataset.c:572:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘old’ glib-2.80.0/glib/gdataset.c:50: included_from: Included from here. glib-2.80.0/glib/galloca.h:114:28: note: in definition of macro ‘g_alloca0’ glib-2.80.0/glib/gdataset.c:552:11: note: in expansion of macro ‘g_newa0’ glib-2.80.0/glib/gdataset.c:552:11: note: in expansion of macro ‘g_newa0’ # 570| /* We must invoke the destroy notifications in the order of @keys. # 571| * Hence, build up the list @old at index @i_keys. */ # 572|-> old[i_keys] = *data; # 573| found_keys++; # 574| remove = TRUE; Error: CPPCHECK_WARNING (CWE-562): glib-2.80.0/glib/gdataset.c:996: error[returnDanglingLifetime]: Returning pointer to local variable 'new_data' that will be invalid when returning. # 994| g_datalist_unlock (datalist); # 995| # 996|-> return result; # 997| } # 998| Error: CPPCHECK_WARNING (CWE-562): glib-2.80.0/glib/gdataset.c:996: error[returnDanglingLifetime]: Returning pointer to local variable 'new_destroy' that will be invalid when returning. # 994| g_datalist_unlock (datalist); # 995| # 996|-> return result; # 997| } # 998| Error: CLANG_WARNING: glib-2.80.0/glib/gdatetime.c:3160:5: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 3158| # 3159| while (i) # 3160|-> g_string_append (str, tmp[--i]); # 3161| } # 3162| Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/glib/gfileutils.c:1933: warning[nullPointer]: Possible null pointer dereference: args # 1931| next_element = str_array[i++]; # 1932| else # 1933|-> next_element = va_arg (*args, gchar *); # 1934| } # 1935| else Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gfileutils.c: scope_hint: In function ‘g_get_current_dir’ glib-2.80.0/glib/gfileutils.c:2994:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gfileutils.c:22: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gfileutils.c:2988:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gfileutils.c:2988:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gfileutils.c:2993:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gfileutils.c:2993:7: note: in expansion of macro ‘g_assert’ # 2992| /* Fallback return value */ # 2993| g_assert (buffer_size >= 2); # 2994|-> buffer[0] = G_DIR_SEPARATOR; # 2995| buffer[1] = 0; # 2996| } Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gdbusobjectmanager.h:26: included_from: Included from here. glib-2.80.0/gio/gdbusobjectmanagerserver.c:25: included_from: Included from here. glib-2.80.0/gio/gdbusobjectmanagerserver.c: scope_hint: In function ‘is_valid_child_object_path’ glib-2.80.0/glib/ghash.h:175:30: warning[-Wanalyzer-null-argument]: use of NULL ‘child_object_path’ where non-null expected glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:562:8: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:480:3: note: in expansion of macro ‘g_warn_if_fail’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:480:20: note: in expansion of macro ‘g_str_equal’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:600:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobjectmanagerserver.h:34:52: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:600:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT_MANAGER_SERVER’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:600:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobjectmanagerserver.h:34:52: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:600:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT_MANAGER_SERVER’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:601:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobject.h:32:37: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:601:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:601:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobject.h:32:37: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:601:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:602:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gio/gdbusobjectmanagerserver.c:606:17: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:497:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobjectmanagerserver.h:34:52: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:497:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT_MANAGER_SERVER’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:497:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobjectmanagerserver.h:34:52: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:497:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT_MANAGER_SERVER’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:497:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobject.h:32:37: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobject.h:32:70: note: in expansion of macro ‘G_TYPE_DBUS_OBJECT’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobject.h:32:37: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ glib-2.80.0/gio/gdbusobject.h:32:37: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:21: note: in expansion of macro ‘G_IS_DBUS_OBJECT’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:498:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:499:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:499:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:562:8: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:480:3: note: in expansion of macro ‘g_warn_if_fail’ glib-2.80.0/gio/gdbusobjectmanagerserver.c:480:20: note: in expansion of macro ‘g_str_equal’ glib-2.80.0/glib/galloca.h:35: included_from: Included from here. /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 173| # 174| /* Macro for optimization in the case it is not used as callback function */ # 175|-> #define g_str_equal(v1, v2) (strcmp ((const char *) (v1), (const char *) (v2)) == 0) # 176| # 177| GLIB_AVAILABLE_IN_ALL Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/glib.h:52: included_from: Included from here. glib-2.80.0/gobject/gbinding.h:30: included_from: Included from here. glib-2.80.0/glib/glib-object.h:24: included_from: Included from here. glib-2.80.0/gio/gioenums.h:30: included_from: Included from here. glib-2.80.0/gio/giotypes.h:30: included_from: Included from here. glib-2.80.0/gio/gnotificationbackend.h:25: included_from: Included from here. glib-2.80.0/gio/gfdonotificationbackend.c:24: included_from: Included from here. glib-2.80.0/gio/gfdonotificationbackend.c: scope_hint: In function ‘g_fdo_notification_backend_find_notification’ glib-2.80.0/glib/ghash.h:175:30: warning[-Wanalyzer-null-argument]: use of NULL ‘id’ where non-null expected glib-2.80.0/gio/gfdonotificationbackend.c:111:11: note: in expansion of macro ‘g_str_equal’ glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/gio/gfdonotificationbackend.c:93:11: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/gfdonotificationbackend.c: scope_hint: In function ‘g_fdo_notification_backend_find_notification’ glib-2.80.0/gio/gfdonotificationbackend.c:111:11: note: in expansion of macro ‘g_str_equal’ glib-2.80.0/glib/galloca.h:35: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. /usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null # 173| # 174| /* Macro for optimization in the case it is not used as callback function */ # 175|-> #define g_str_equal(v1, v2) (strcmp ((const char *) (v1), (const char *) (v2)) == 0) # 176| # 177| GLIB_AVAILABLE_IN_ALL Error: CLANG_WARNING: glib-2.80.0/glib/ghostutils.c:705:11: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'hostname') # 703| # 704| hostname += llen; # 705|-> if (*hostname) # 706| hostname = g_utf8_next_char (hostname); # 707| if (*hostname) Error: COMPILER_WARNING: glib-2.80.0/redhat-linux-build/g-ir-cpp-bu34bw8t.c:43: included_from: Included from here. glib-2.80.0/glib/gi18n-lib.h:32:10: warning: "_" redefined # 32 | #define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) # | ^ glib-2.80.0/redhat-linux-build/g-ir-cpp-bu34bw8t.c:42: included_from: Included from here. glib-2.80.0/glib/gi18n.h:28:10: note: this is the location of the previous definition # 28 | #define _(String) gettext (String) # | ^ # 30| #endif # 31| # 32|-> #define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) # 33| #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) # 34| #define N_(String) (String) Error: COMPILER_WARNING: glib-2.80.0/glib/gi18n-lib.h:33:9: warning: "Q_" redefined # 33 | #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) # | ^~ glib-2.80.0/glib/gi18n.h:29:9: note: this is the location of the previous definition # 29 | #define Q_(String) g_dpgettext (NULL, String, 0) # | ^~ # 31| # 32| #define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) # 33|-> #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) # 34| #define N_(String) (String) # 35| #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) Error: COMPILER_WARNING: glib-2.80.0/glib/gi18n-lib.h:35:9: warning: "C_" redefined # 35 | #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) # | ^~ glib-2.80.0/glib/gi18n.h:31:9: note: this is the location of the previous definition # 31 | #define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1) # | ^~ # 33| #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) # 34| #define N_(String) (String) # 35|-> #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) # 36| #define NC_(Context, String) (String) # 37| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_set_group_comment’ glib-2.80.0/glib/gkeyfile.c:3401:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/gbytes.h:31: included_from: Included from here. glib-2.80.0/glib/gkeyfile.h:30: included_from: Included from here. glib-2.80.0/glib/gkeyfile.c:28: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3382:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3382:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3382:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:4177:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3382:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3382:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_set_group_comment’ # 3399| */ # 3400| group_node = g_key_file_lookup_group_node (key_file, group_name); # 3401|-> group = group_node->next->data; # 3402| for (GList *lp = group->key_value_pairs; lp != NULL; ) # 3403| { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_get_group_comment’ glib-2.80.0/glib/gkeyfile.c:3630:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_get_group_comment’ # 3628| # 3629| group_node = g_key_file_lookup_group_node (key_file, group_name); # 3630|-> group_node = group_node->next; # 3631| group = (GKeyFileGroup *)group_node->data; # 3632| return get_group_comment (key_file, group, error); Error: CPPCHECK_WARNING (CWE-909): glib-2.80.0/glib/gkeyfile.c:3857: error[uninitStructMember]: Uninitialized struct member: pair.key # 3855| # 3856| if (next_group->key_value_pairs == NULL || # 3857|-> (pair->key != NULL && !g_strstr_len (pair->value, -1, "\n"))) # 3858| { # 3859| GKeyFileKeyValuePair *pair = g_new (GKeyFileKeyValuePair, 1); Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gkeyfile.c:3857: warning[uninitvar]: Uninitialized variable: pair # 3855| # 3856| if (next_group->key_value_pairs == NULL || # 3857|-> (pair->key != NULL && !g_strstr_len (pair->value, -1, "\n"))) # 3858| { # 3859| GKeyFileKeyValuePair *pair = g_new (GKeyFileKeyValuePair, 1); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/glist.h:34: included_from: Included from here. glib-2.80.0/glib/ghash.h:36: included_from: Included from here. glib-2.80.0/glib/gkeyfile.c:64: included_from: Included from here. glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_string’ glib-2.80.0/glib/gkeyfile.c:4310:32: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected glib-2.80.0/glib/gmem.h:261:32: note: in definition of macro ‘_G_NEW’ glib-2.80.0/glib/gkeyfile.c:4310:18: note: in expansion of macro ‘g_new’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3189:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3190:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3190:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3191:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:3191:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2053:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2054:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2054:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2055:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2055:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1830:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1831:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1831:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1832:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1832:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_string’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_string’ glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/gvariant.h:31: included_from: Included from here. glib-2.80.0/glib/gmessages.h:38: included_from: Included from here. glib-2.80.0/glib/gkeyfile.c:69: included_from: Included from here. glib-2.80.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’ glib-2.80.0/glib/gkeyfile.c:1848:13: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:4308:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:4308:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:4308:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmem.h:261:32: note: in definition of macro ‘_G_NEW’ glib-2.80.0/glib/gkeyfile.c:4310:18: note: in expansion of macro ‘g_new’ glib-2.80.0/glib/gmem.h:261:32: note: in definition of macro ‘_G_NEW’ glib-2.80.0/glib/gkeyfile.c:4310:18: note: in expansion of macro ‘g_new’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 4308| g_assert (pieces == NULL || *pieces == NULL); # 4309| # 4310|-> string_value = g_new (gchar, strlen (value) + 1); # 4311| # 4312| p = value; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_integer’ glib-2.80.0/glib/gkeyfile.c:4511:16: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2721:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2722:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2722:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2723:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:2723:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1830:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1831:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1831:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1832:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gkeyfile.c:1832:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_integer’ glib-2.80.0/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_parse_value_as_integer’ glib-2.80.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’ glib-2.80.0/glib/gkeyfile.c:1848:13: note: in expansion of macro ‘g_strdup’ /usr/include/features.h:511: included_from: Included from here. /usr/include/bits/libc-header-start.h:33: included_from: Included from here. /usr/include/limits.h:26: included_from: Included from here. /usr/lib/gcc/x86_64-redhat-linux/14/include/limits.h:210: included_from: Included from here. /usr/lib/gcc/x86_64-redhat-linux/14/include/syslimits.h:7: included_from: Included from here. /usr/lib/gcc/x86_64-redhat-linux/14/include/limits.h:34: included_from: Included from here. glib-2.80.0/redhat-linux-build/glib/glibconfig.h:11: included_from: Included from here. /usr/include/stdlib.h:215:17: note: argument 1 of ‘strtol’ must be non-null # 4509| # 4510| errno = 0; # 4511|-> long_value = strtol (value, &eof_int, 10); # 4512| errsv = errno; # 4513| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/gmessages.c: scope_hint: In function ‘print_string’ glib-2.80.0/glib/gmessages.c:3406:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/gvariant.h:31: included_from: Included from here. glib-2.80.0/glib/gmessages.h:38: included_from: Included from here. glib-2.80.0/glib/glib-init.h:25: included_from: Included from here. glib-2.80.0/glib/gmessages.c:54: included_from: Included from here. glib-2.80.0/glib/gmessages.c:940:18: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/gmessages.c: scope_hint: In function ‘print_string’ glib-2.80.0/glib/gmessages.c:940:18: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/gmessages.c:35: included_from: Included from here. /usr/include/stdio.h:717:12: note: argument 1 of ‘fputs’ must be non-null # 3404| gchar *converted_string = strdup_convert (string, charset); # 3405| # 3406|-> ret = fputs (converted_string, stream); # 3407| g_free (converted_string); # 3408| } Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gtestutils.h:28: included_from: Included from here. glib-2.80.0/glib/gthread.c:65: included_from: Included from here. glib-2.80.0/glib/gthread.c: scope_hint: In function ‘g_thread_new’ glib-2.80.0/glib/gmessages.h:351:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/glib/gthread.c:895:5: note: in expansion of macro ‘g_error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/gatomic.h:29: included_from: Included from here. glib-2.80.0/glib/gthread.h:34: included_from: Included from here. glib-2.80.0/glib/gthread.c:43: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gthread.c:934:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gthread.c:934:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gthread.c:894:6: note: in expansion of macro ‘G_UNLIKELY’ glib-2.80.0/glib/gmessages.h:353:32: note: in definition of macro ‘g_error’ glib-2.80.0/glib/gmessages.h:353:32: note: in definition of macro ‘g_error’ glib-2.80.0/glib/gthread.c:895:5: note: in expansion of macro ‘g_error’ # 349| */ # 350| #define g_error(...) G_STMT_START { \ # 351|-> g_log (G_LOG_DOMAIN, \ # 352| G_LOG_LEVEL_ERROR, \ # 353| __VA_ARGS__); \ Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/glib/glib-private.h:23: included_from: Included from here. glib-2.80.0/gio/gsettingsschema.c:23: included_from: Included from here. glib-2.80.0/gio/gsettingsschema.c: scope_hint: In function ‘g_settings_schema_get_value.part.0’ glib-2.80.0/glib/gmessages.h:351:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘schema’ glib-2.80.0/gio/gsettingsschema.c:1005:5: note: in expansion of macro ‘g_error’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/gio/gsettingsschema.c:1004:6: note: in expansion of macro ‘G_UNLIKELY’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/gio/gsettingsschema.c:1004:6: note: in expansion of macro ‘G_UNLIKELY’ glib-2.80.0/gio/gsettingsschema.c:1005:5: note: in expansion of macro ‘g_error’ glib-2.80.0/gio/gsettingsschema.c:1005:5: note: in expansion of macro ‘g_error’ # 349| */ # 350| #define g_error(...) G_STMT_START { \ # 351|-> g_log (G_LOG_DOMAIN, \ # 352| G_LOG_LEVEL_ERROR, \ # 353| __VA_ARGS__); \ Error: GCC_ANALYZER_WARNING (CWE-835): glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/glib/tests/constructor-helper.c:33: included_from: Included from here. glib-2.80.0/glib/tests/constructor-helper.c: scope_hint: In function ‘string_add’ glib-2.80.0/glib/gmessages.h:354:25: warning[-Wanalyzer-infinite-loop]: infinite loop glib-2.80.0/glib/tests/constructor-helper.c:158:5: note: in expansion of macro ‘g_error’ glib-2.80.0/glib/tests/constructor-helper.c:158:5: note: in expansion of macro ‘g_error’ glib-2.80.0/glib/tests/constructor-helper.c:158:5: note: in expansion of macro ‘g_error’ glib-2.80.0/glib/tests/constructor-helper.c:158:5: note: in expansion of macro ‘g_error’ # 352| G_LOG_LEVEL_ERROR, \ # 353| __VA_ARGS__); \ # 354|-> for (;;) ; \ # 355| } G_STMT_END # 356| #define g_message(...) g_log (G_LOG_DOMAIN, \ Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/gio/gunixmounts.c: scope_hint: In function ‘mount_monitor_start’ glib-2.80.0/glib/gmessages.h:362:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’ glib-2.80.0/gio/gunixmounts.c:2079:15: note: in expansion of macro ‘g_warning’ glib-2.80.0/gio/gunixmounts.c:2038:11: note: in expansion of macro ‘g_str_has_prefix’ glib-2.80.0/glib/gmessages.h:364:32: note: in definition of macro ‘g_warning’ glib-2.80.0/glib/gmessages.h:364:32: note: in definition of macro ‘g_warning’ glib-2.80.0/gio/gunixmounts.c:2079:15: note: in expansion of macro ‘g_warning’ # 360| G_LOG_LEVEL_CRITICAL, \ # 361| __VA_ARGS__) # 362|-> #define g_warning(...) g_log (G_LOG_DOMAIN, \ # 363| G_LOG_LEVEL_WARNING, \ # 364| __VA_ARGS__) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gqueue.c: scope_hint: In function ‘g_queue_push_nth_link’ glib-2.80.0/glib/gqueue.c:484:8: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/gutils.h:34: included_from: Included from here. glib-2.80.0/glib/gmem.h:34: included_from: Included from here. glib-2.80.0/glib/glist.h:34: included_from: Included from here. glib-2.80.0/glib/gqueue.h:34: included_from: Included from here. glib-2.80.0/glib/gqueue.c:29: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:471:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:472:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:651:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:472:3: note: in expansion of macro ‘g_return_if_fail’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:480:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:480:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:481:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:481:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gqueue.c:752:3: note: in expansion of macro ‘g_return_val_if_fail’ # 482| # 483| next = g_queue_peek_nth_link (queue, n); # 484|-> prev = next->prev; # 485| # 486| if (prev) Error: CLANG_WARNING: glib-2.80.0/glib/grand.c:196:22: warning[unix.Errno]: An undefined value may be read from 'errno' # 194| r = fread (seed, sizeof (seed), 1, dev_urandom); # 195| } # 196|-> while G_UNLIKELY (errno == EINTR); # 197| # 198| if (r != 1) Error: CLANG_WARNING: glib-2.80.0/glib/gsequence.c:1724:15: warning[core.NullDereference]: Access to field 'left' results in a dereference of a null pointer (loaded from variable 'node') # 1722| node = find_root (node); # 1723| # 1724|-> while ((i = N_NODES (node->left)) != pos) # 1725| { # 1726| if (i < pos) Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/glib/gslist.c:283: warning[nullPointer]: Possible null pointer dereference: prev_list # 281| } # 282| # 283|-> new_list->next = prev_list->next; # 284| prev_list->next = new_list; # 285| Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/glib/gslist.c:284: warning[nullPointer]: Possible null pointer dereference: prev_list # 282| # 283| new_list->next = prev_list->next; # 284|-> prev_list->next = new_list; # 285| # 286| return list; Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/gio/glocalfileinfo.h:35: included_from: Included from here. glib-2.80.0/gio/glocalfile.c:60: included_from: Included from here. glib-2.80.0/gio/glocalfile.c: scope_hint: In function ‘expand_symlinks’ glib-2.80.0/glib/gstdio.h:78:19: warning[-Wanalyzer-null-argument]: use of NULL ‘target’ where non-null expected glib-2.80.0/gio/glocalfile.c:1595:11: note: in expansion of macro ‘g_lstat’ glib-2.80.0/gio/glocalfile.c:1590:12: note: in expansion of macro ‘g_strdup’ glib-2.80.0/gio/glocalfile.c:1595:11: note: in expansion of macro ‘g_lstat’ /usr/include/features.h:511: included_from: Included from here. /usr/include/sys/types.h:25: included_from: Included from here. glib-2.80.0/gio/glocalfile.c:25: included_from: Included from here. /usr/include/sys/stat.h:327:12: note: argument 1 of ‘lstat’ must be non-null # 76| #define g_mkdir mkdir # 77| #define g_stat stat # 78|-> #define g_lstat lstat # 79| #define g_remove remove # 80| #define g_fopen fopen Error: CLANG_WARNING: glib-2.80.0/glib/gspawn.c:61: included_from: Included from here. glib-2.80.0/glib/gstdio.h:187:3: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 185| GError **error) # 186| { # 187|-> int fd = *fd_ptr; # 188| # 189| *fd_ptr = -1; Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/gtester.c: scope_hint: In function ‘test_log_printfe’ glib-2.80.0/glib/gtester.c:91:9: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘-1’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/glib/gtester.c:22: included_from: Included from here. glib-2.80.0/glib/gtester.c:702:5: note: in expansion of macro ‘g_warning’ # 89| va_end (args); # 90| do # 91|-> r = write (log_fd, result, strlen (result)); # 92| while (r < 0 && errno == EINTR); # 93| g_free (result); Error: CLANG_WARNING: glib-2.80.0/glib/gtestutils.c:4311:17: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 4309| for (ui = 0; ui < msg->n_strings; ui++) # 4310| { # 4311|-> guint l = strlen (msg->strings[ui]); # 4312| gstring_append_int (gstring, l); # 4313| g_string_append_len (gstring, msg->strings[ui], l); Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/glib/gtimezone.c:283: error[ctunullpointer]: Null pointer dereference: tz # 281| g_time_zone_ref (GTimeZone *tz) # 282| { # 283|-> g_assert (tz->ref_count > 0); # 284| # 285| g_atomic_int_inc (&tz->ref_count); Error: CPPCHECK_WARNING (CWE-476): glib-2.80.0/glib/gtimezone.c:283: warning[nullPointer]: Possible null pointer dereference: tz # 281| g_time_zone_ref (GTimeZone *tz) # 282| { # 283|-> g_assert (tz->ref_count > 0); # 284| # 285| g_atomic_int_inc (&tz->ref_count); Error: CLANG_WARNING: glib-2.80.0/glib/gtimezone.c:283:13: warning[core.NullDereference]: Access to field 'ref_count' results in a dereference of a null pointer (loaded from variable 'tz') # 281| g_time_zone_ref (GTimeZone *tz) # 282| { # 283|-> g_assert (tz->ref_count > 0); # 284| # 285| g_atomic_int_inc (&tz->ref_count); Error: CLANG_WARNING: glib-2.80.0/glib/gunidecomp.c:433:9: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<=' is a garbage value due to array index out of bounds # 431| if (n_wc > 0) # 432| { # 433|-> cc = COMBINING_CLASS (wc_buffer[old_n_wc]); # 434| # 435| if (cc == 0) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/gutils.c: scope_hint: In function ‘g_get_user_database_entry’ glib-2.80.0/glib/gutils.c:748:74: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/glib/glib-private.h:23: included_from: Included from here. glib-2.80.0/glib/gutils.c:62: included_from: Included from here. glib-2.80.0/glib/gutils.c:658:7: note: in expansion of macro ‘g_once_init_enter_pointer’ glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/gvariant.h:31: included_from: Included from here. glib-2.80.0/glib/gmessages.h:38: included_from: Included from here. glib-2.80.0/glib/gtestutils.h:28: included_from: Included from here. glib-2.80.0/glib/gutilsprivate.h:27: included_from: Included from here. glib-2.80.0/glib/gutils.c:34: included_from: Included from here. glib-2.80.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’ glib-2.80.0/glib/gutils.c:747:37: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/gutils.c: scope_hint: In function ‘g_get_user_database_entry’ # 746| name_parts = g_strsplit (gecos_fields[0], "&", 0); # 747| uppercase_pw_name = g_strdup (pw->pw_name); # 748|-> uppercase_pw_name[0] = g_ascii_toupper (uppercase_pw_name[0]); # 749| e.real_name = g_strjoinv (uppercase_pw_name, name_parts); # 750| g_strfreev (gecos_fields); Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3304: error[uninitvar]: Uninitialized variable: euid # 3302| /* These aren't in the header files, so we prototype them here. # 3303| */ # 3304|-> int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305| int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3304: error[uninitvar]: Uninitialized variable: ruid # 3302| /* These aren't in the header files, so we prototype them here. # 3303| */ # 3304|-> int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305| int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3304: error[uninitvar]: Uninitialized variable: suid # 3302| /* These aren't in the header files, so we prototype them here. # 3303| */ # 3304|-> int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305| int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3305: error[uninitvar]: Uninitialized variable: egid # 3303| */ # 3304| int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305|-> int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| # 3307| if (getresuid (&ruid, &euid, &suid) != 0 || Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3305: error[uninitvar]: Uninitialized variable: rgid # 3303| */ # 3304| int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305|-> int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| # 3307| if (getresuid (&ruid, &euid, &suid) != 0 || Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gutils.c:3305: error[uninitvar]: Uninitialized variable: sgid # 3303| */ # 3304| int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); # 3305|-> int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); # 3306| # 3307| if (getresuid (&ruid, &euid, &suid) != 0 || Error: CLANG_WARNING: glib-2.80.0/glib/gvariant-serialiser.c:738:1: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 736| # 737| #define NO_CONVERSION(x) (x) # 738|-> DEFINE_FIND_UNORDERED (guint8, NO_CONVERSION); # 739| DEFINE_FIND_UNORDERED (guint16, GUINT16_FROM_LE); # 740| DEFINE_FIND_UNORDERED (guint32, GUINT32_FROM_LE); Error: CLANG_WARNING: glib-2.80.0/glib/gvariant-serialiser.c:739:1: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 737| #define NO_CONVERSION(x) (x) # 738| DEFINE_FIND_UNORDERED (guint8, NO_CONVERSION); # 739|-> DEFINE_FIND_UNORDERED (guint16, GUINT16_FROM_LE); # 740| DEFINE_FIND_UNORDERED (guint32, GUINT32_FROM_LE); # 741| DEFINE_FIND_UNORDERED (guint64, GUINT64_FROM_LE); Error: CLANG_WARNING: glib-2.80.0/glib/gvariant-serialiser.c:740:1: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 738| DEFINE_FIND_UNORDERED (guint8, NO_CONVERSION); # 739| DEFINE_FIND_UNORDERED (guint16, GUINT16_FROM_LE); # 740|-> DEFINE_FIND_UNORDERED (guint32, GUINT32_FROM_LE); # 741| DEFINE_FIND_UNORDERED (guint64, GUINT64_FROM_LE); # 742| Error: CLANG_WARNING: glib-2.80.0/glib/gvariant-serialiser.c:741:1: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 739| DEFINE_FIND_UNORDERED (guint16, GUINT16_FROM_LE); # 740| DEFINE_FIND_UNORDERED (guint32, GUINT32_FROM_LE); # 741|-> DEFINE_FIND_UNORDERED (guint64, GUINT64_FROM_LE); # 742| # 743| static GVariantSerialised Error: CLANG_WARNING: glib-2.80.0/glib/gvariant-serialiser.c:923:38: warning[core.NullDereference]: Array access (via field 'data') results in a null pointer dereference # 921| while (offset & alignment) # 922| { # 923|-> if (!(offset < this_end && value.data[offset] == '\0')) # 924| return FALSE; # 925| offset++; Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/gvariant.c:3777: error[legacyUninitvar]: Uninitialized variable: my_type # 3775| g_assert_not_reached (); # 3776| # 3777|-> value = g_variant_new_from_children (my_type, # 3778| g_renew (GVariant *, # 3779| GVSB(builder)->children, Error: COMPILER_WARNING: glib-2.80.0/glib/gvariant.c: scope_hint: In function ‘g_variant_dict_new’ glib-2.80.0/glib/gvariant.c:3981:8: warning[-Walloc-size]: allocation of insufficient size ‘32’ for type ‘GVariantDict’ {aka ‘struct _GVariantDict’} with size ‘128’ # 3981 | dict = g_slice_alloc (sizeof (struct heap_dict)); # | ^ # 3979| GVariantDict *dict; # 3980| # 3981|-> dict = g_slice_alloc (sizeof (struct heap_dict)); # 3982| g_variant_dict_init (dict, from_asv); # 3983| GVHD(dict)->magic = GVHD_MAGIC; Error: CLANG_WARNING: glib-2.80.0/glib/gvariant.c:4435:24: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' # 4433| if ((c = next_char()) == 'a') # 4434| { # 4435|-> if ((c = next_char()) == 'y') # 4436| break; /* '^a&ay' */ # 4437| } Error: CLANG_WARNING: glib-2.80.0/glib/gvariant.c:4445:20: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' # 4443| else if (c == 'a') # 4444| { # 4445|-> if ((c = next_char()) == 'y') # 4446| break; /* '^aay' */ # 4447| } Error: CLANG_WARNING: glib-2.80.0/glib/gvariant.c:4457:16: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' # 4455| else if (c == '&') # 4456| { # 4457|-> if ((c = next_char()) == 'a') # 4458| { # 4459| if ((c = next_char()) == 'y') Error: CLANG_WARNING: glib-2.80.0/glib/gvariant.c:4459:20: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' # 4457| if ((c = next_char()) == 'a') # 4458| { # 4459|-> if ((c = next_char()) == 'y') # 4460| break; /* '^&ay' */ # 4461| } Error: CLANG_WARNING: glib-2.80.0/glib/gvariant.c:4637:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'dest' # 4635| *dest = '\0'; # 4636| # 4637|-> return (GVariantType *) G_VARIANT_TYPE (new); # 4638| } # 4639| Error: CLANG_WARNING: glib-2.80.0/glib/tests/autoptr.c:468:7: warning[deadcode.DeadStores]: Value stored to 'other' is never read # 466| g_thread_join (g_steal_pointer (&thread)); # 467| # 468|-> other = g_rec_mutex_locker_new (&rec_mutex); # 469| thread = g_thread_new ("rec mutex locked", rec_mutex_locked_thread, &rec_mutex); # 470| g_thread_join (g_steal_pointer (&thread)); Error: CLANG_WARNING: glib-2.80.0/glib/tests/autoptr.c:744:5: warning[deadcode.DeadStores]: Value stored to 'l' is never read # 742| # 743| l = g_slist_prepend (l, b1); # 744|-> l = g_slist_prepend (l, b3); # 745| } # 746| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_error_private_init’ glib-2.80.0/glib/tests/error.c:261:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘priv’ glib-2.80.0/glib/gthread.h:35: included_from: Included from here. glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:34: included_from: Included from here. glib-2.80.0/glib/tests/error.c:1: included_from: Included from here. glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:89:32: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/glib.h:64: included_from: Included from here. glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:89:32: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:90:3: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ # 259| test_error_private_init (TestErrorPrivate *priv) # 260| { # 261|-> priv->foo = 13; # 262| /* If that triggers, it's test bug. # 263| */ Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/tests/error.c:275:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘g_error_with_test_error_private_copy’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:97:42: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:97:42: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:98:37: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:98:37: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:99:3: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ # 273| TestErrorPrivate *dest_priv) # 274| { # 275|-> dest_priv->foo = src_priv->foo; # 276| dest_priv->check = src_priv->check; # 277| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/tests/error.c:275:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘g_error_with_test_error_private_copy’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:97:42: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:97:42: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:98:37: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:98:37: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:99:3: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ # 273| TestErrorPrivate *dest_priv) # 274| { # 275|-> dest_priv->foo = src_priv->foo; # 276| dest_priv->check = src_priv->check; # 277| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/tests/error.c:284:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘g_error_with_test_error_private_clear’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:105:32: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:105:32: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:106:3: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ # 282| test_error_private_clear (TestErrorPrivate *priv) # 283| { # 284|-> priv->check->free_called++; # 285| } # 286| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/tests/error.c:294:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_extended’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_extended’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ # 292| TestErrorPrivate *test_error = test_error_get_private (error); # 293| # 294|-> test_error->check = check; # 295| # 296| return test_error; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_extended’ glib-2.80.0/glib/tests/error.c:329:54: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/glib/gtestutils.h:54:74: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_extended’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/tests/error.c: scope_hint: In function ‘test_extended’ glib-2.80.0/glib/gerror.h:76:1: note: in definition of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:81:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:82:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/gerror.h:82:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gerror.h:82:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/tests/error.c:287:1: note: in expansion of macro ‘G_DEFINE_EXTENDED_ERROR’ glib-2.80.0/glib/gtestutils.h:54:74: note: in definition of macro ‘g_assert_cmpint’ # 327| # 328| copy_test_priv = test_error_get_private (copy_error); # 329|-> g_assert_cmpint (test_priv->foo, ==, copy_test_priv->foo); # 330| # 331| g_error_free (error); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/fileutils.c: scope_hint: In function ‘test_read_link’ glib-2.80.0/glib/tests/fileutils.c:2040:3: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen("file-test-data", "w")’ where non-null expected glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/tests/fileutils.c:33: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/fileutils.c:2039:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/fileutils.c:2039:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/fileutils.c:2039:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gprintf.h:24: included_from: Included from here. glib-2.80.0/glib/gstdio.h:24: included_from: Included from here. glib-2.80.0/glib/tests/fileutils.c:37: included_from: Included from here. /usr/include/stdio.h:184:12: note: argument 1 of ‘fclose’ must be non-null # 2038| file = fopen (filename, "w"); # 2039| g_assert_nonnull (file); # 2040|-> fclose (file); # 2041| # 2042| g_assert_no_errno (symlink (filename, link1)); Error: CLANG_WARNING: glib-2.80.0/glib/tests/gdatetime.c:1353:3: warning[deadcode.DeadStores]: Value stored to 'dt' is never read # 1351| # 1352| /* Year limits */ # 1353|-> dt = g_date_time_new_utc (10000, 1, 1, 0, 0, 0); # 1354| dt = g_date_time_new_utc (0, 1, 1, 0, 0, 0); # 1355| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/gdatetime.c:1354:3: warning[deadcode.DeadStores]: Value stored to 'dt' is never read # 1352| /* Year limits */ # 1353| dt = g_date_time_new_utc (10000, 1, 1, 0, 0, 0); # 1354|-> dt = g_date_time_new_utc (0, 1, 1, 0, 0, 0); # 1355| } # 1356| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/tests/gvariant.c:481: error[legacyUninitvar]: Uninitialized variable: result # 479| } # 480| # 481|-> return result; # 482| } # 483| Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/tests/gvariant.c:538: error[legacyUninitvar]: Uninitialized variable: replacement # 536| g_string_append (result, type_string + l + 1); # 537| # 538|-> g_variant_type_free (replacement); # 539| g_string_free (junk, TRUE); # 540| Error: CLANG_WARNING: glib-2.80.0/glib/tests/io-channel.c:190:3: warning[deadcode.DeadStores]: Value stored to 'fd' is never read # 188| g_assert_no_error (local_error); # 189| g_close (fd, NULL); # 190|-> fd = -1; # 191| # 192| g_file_set_contents (filename, (const gchar *) test_data, sizeof (test_data), &local_error); Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/glib/tests/keyfile.c: scope_hint: In function ‘check_double_list_value’ glib-2.80.0/glib/tests/keyfile.c:205:9: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (3 consumed) glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/tests/keyfile.c:2: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:138:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:138:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ # 203| g_assert_cmpfloat (value[i], ==, v); # 204| i++; # 205|-> v = va_arg (args, gdouble); # 206| } # 207| Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/glib/tests/keyfile.c:205:9: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (4 consumed) glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/keyfile.c:105:7: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/tests/keyfile.c:234:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:234:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:170:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:170:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:170:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/keyfile.c:202:7: note: in expansion of macro ‘g_assert_cmpint’ # 203| g_assert_cmpfloat (value[i], ==, v); # 204| i++; # 205|-> v = va_arg (args, gdouble); # 206| } # 207| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/glib/tests/mainloop.c: scope_hint: In function ‘test_unix_fd’ glib-2.80.0/glib/tests/mainloop.c:1316:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds[1]’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/mainloop.c:25: included_from: Included from here. glib-2.80.0/glib/tests/mainloop.c:1314:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/mainloop.c:1314:3: note: in expansion of macro ‘g_assert_cmpint’ # 1314| g_assert_cmpint (s, ==, 0); # 1315| # 1316|-> to_read = fill_a_pipe (fds[1]); # 1317| /* write at higher priority to keep the pipe full... */ # 1318| a = g_unix_fd_add_full (G_PRIORITY_HIGH, fds[1], G_IO_OUT, write_bytes, &to_write, NULL); Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/glib/tests/mainloop.c: scope_hint: In function ‘test_unix_fd_source’ glib-2.80.0/glib/tests/mainloop.c:1443:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds[1]’ glib-2.80.0/glib/tests/mainloop.c:1441:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/mainloop.c:1441:3: note: in expansion of macro ‘g_assert_cmpint’ # 1441| g_assert_cmpint (s, ==, 0); # 1442| # 1443|-> source = g_unix_fd_source_new (fds[1], G_IO_OUT); # 1444| g_source_attach (source, NULL); # 1445| Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/glib/tests/mainloop.c: scope_hint: In function ‘test_source_unix_fd_api’ glib-2.80.0/glib/tests/mainloop.c:1550:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds_a[0]’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/mainloop.c:1543:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/mainloop.c:1543:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/gtestutils.h:54:61: note: in definition of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/mainloop.c:1544:3: note: in expansion of macro ‘g_assert_cmpint’ # 1548| # 1549| /* attach a source with more than one fd */ # 1550|-> g_source_add_unix_fd (source_a, fds_a[0], G_IO_IN); # 1551| g_source_add_unix_fd (source_a, fds_a[1], G_IO_OUT); # 1552| g_source_attach (source_a, NULL); Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/markup-parse.c: scope_hint: In function ‘get_expected_filename’ glib-2.80.0/glib/tests/markup-parse.c:237:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/glib/tests/markup-parse.c:7: included_from: Included from here. glib-2.80.0/glib/tests/markup-parse.c:236:7: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/tests/markup-parse.c: scope_hint: In function ‘get_expected_filename’ <built-in>: note: argument 1 of ‘__builtin_strstr’ must be non-null # 235| # 236| f = g_strdup (filename); # 237|-> p = strstr (f, ".gmarkup"); # 238| if (p) # 239| *p = 0; Error: CPPCHECK_WARNING (CWE-457): glib-2.80.0/glib/tests/markup-parse.c:249: error[legacyUninitvar]: Uninitialized variable: expected # 247| g_free (f); # 248| # 249|-> return expected; # 250| } # 251| Error: COMPILER_WARNING: glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc_a’ glib-2.80.0/glib/tests/mem-overflow.c:74:70: warning[-Wcalloc-transposed-args]: ‘g_aligned_alloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 74 | MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (sizeof(X), a, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ glib-2.80.0/glib/tests/mem-overflow.c:74:70: note: earlier argument should specify number of elements, later size of each element # 74 | MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (sizeof(X), a, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ # 72| MEM_OVERFLOW_TEST (renew_b, p = g_malloc (1); p = g_renew (X, p, b)) # 73| # 74|-> MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (sizeof(X), a, 16), g_aligned_free) # 75| MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) # 76| Error: COMPILER_WARNING: glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc_b’ glib-2.80.0/glib/tests/mem-overflow.c:75:70: warning[-Wcalloc-transposed-args]: ‘g_aligned_alloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 75 | MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ glib-2.80.0/glib/tests/mem-overflow.c:75:70: note: earlier argument should specify number of elements, later size of each element # 75 | MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ # 73| # 74| MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (sizeof(X), a, 16), g_aligned_free) # 75|-> MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) # 76| # 77| MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) Error: COMPILER_WARNING: glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc0_a’ glib-2.80.0/glib/tests/mem-overflow.c:77:72: warning[-Wcalloc-transposed-args]: ‘g_aligned_alloc0’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 77 | MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ glib-2.80.0/glib/tests/mem-overflow.c:77:72: note: earlier argument should specify number of elements, later size of each element # 77 | MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ # 75| MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) # 76| # 77|-> MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) # 78| MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (sizeof(X), b, 16), g_aligned_free) # 79| Error: COMPILER_WARNING: glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc0_b’ glib-2.80.0/glib/tests/mem-overflow.c:78:72: warning[-Wcalloc-transposed-args]: ‘g_aligned_alloc0’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 78 | MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (sizeof(X), b, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ glib-2.80.0/glib/tests/mem-overflow.c:78:72: note: earlier argument should specify number of elements, later size of each element # 78 | MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (sizeof(X), b, 16), g_aligned_free) # | ^ glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’ # 45 | code; \ # | ^~~~ # 76| # 77| MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) # 78|-> MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (sizeof(X), b, 16), g_aligned_free) # 79| # 80| static void Error: CLANG_WARNING: glib-2.80.0/glib/tests/mutex.c:271:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 269| # 270| for (i = 0; n_threads > 0 && i < n_threads - 1; i++) # 271|-> g_thread_join (threads[i]); # 272| # 273| g_test_maximized_result (rate, "%f mips", rate); Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/glib/tests/spawn-singlethread.c: scope_hint: In function ‘test_spawn_async_with_fds’ glib-2.80.0/glib/tests/spawn-singlethread.c:248:45: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘test_pipe[1][0]’ # 246| case STDOUT_PIPE: # 247| g_assert_cmpint (j, ==, 2); /* only works for stderr */ # 248|-> test_pipe[j][0] = test_pipe[1][0]; # 249| test_pipe[j][1] = test_pipe[1][1]; # 250| break; Error: GCC_ANALYZER_WARNING (CWE-666): glib-2.80.0/glib/tests/spawn-singlethread.c: scope_hint: In function ‘test_spawn_stderr_socket’ glib-2.80.0/glib/tests/spawn-singlethread.c:426:17: warning[-Wanalyzer-fd-phase-mismatch]: ‘dup2’ on file descriptor ‘fd’ in wrong phase glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/spawn-singlethread.c:28: included_from: Included from here. glib-2.80.0/glib/tests/spawn-singlethread.c:420:7: note: in expansion of macro ‘g_assert_cmpint’ # 424| #endif # 425| /* Set the socket as FD 2, stderr */ # 426|-> estatus = dup2 (fd, 2); # 427| g_assert_cmpint (estatus, >=, 0); # 428| Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/tests/spawn-singlethread.c:426:17: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘fd’ glib-2.80.0/glib/tests/spawn-singlethread.c:420:7: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/spawn-singlethread.c:420:7: note: in expansion of macro ‘g_assert_cmpint’ # 424| #endif # 425| /* Set the socket as FD 2, stderr */ # 426|-> estatus = dup2 (fd, 2); # 427| g_assert_cmpint (estatus, >=, 0); # 428| Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/tests/spawn-test.c: scope_hint: In function ‘test_spawn_stdio_overwrite’ glib-2.80.0/glib/tests/spawn-test.c:488:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stderr_fd’ glib-2.80.0/glib/glist.h:34: included_from: Included from here. glib-2.80.0/glib/ghash.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:52: included_from: Included from here. glib-2.80.0/glib/tests/spawn-test.c:27: included_from: Included from here. glib-2.80.0/glib/tests/spawn-test.c:486:9: note: in expansion of macro ‘g_clear_pointer’ # 486| g_clear_pointer (&argv, g_strfreev); # 487| # 488|-> ret = dup2 (old_stderr_fd, STDERR_FILENO); # 489| g_assert_cmpint (ret, ==, STDERR_FILENO); # 490| Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/tests/spawn-test.c:491:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stdout_fd’ glib-2.80.0/glib/tests/spawn-test.c:486:9: note: in expansion of macro ‘g_clear_pointer’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/spawn-test.c:489:9: note: in expansion of macro ‘g_assert_cmpint’ # 489| g_assert_cmpint (ret, ==, STDERR_FILENO); # 490| # 491|-> ret = dup2 (old_stdout_fd, STDOUT_FILENO); # 492| g_assert_cmpint (ret, ==, STDOUT_FILENO); # 493| Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/tests/spawn-test.c:494:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stdin_fd’ glib-2.80.0/glib/tests/spawn-test.c:486:9: note: in expansion of macro ‘g_clear_pointer’ glib-2.80.0/glib/tests/spawn-test.c:489:9: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/spawn-test.c:492:9: note: in expansion of macro ‘g_assert_cmpint’ # 492| g_assert_cmpint (ret, ==, STDOUT_FILENO); # 493| # 494|-> ret = dup2 (old_stdin_fd, STDIN_FILENO); # 495| g_assert_cmpint (ret, ==, STDIN_FILENO); # 496| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:262:7: warning[deadcode.DeadStores]: Value stored to 'str_cpy_end' is never read # 260| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 261| "*assertion*!= NULL*"); # 262|-> str_cpy_end = g_stpcpy (str_cpy, NULL); # 263| g_test_assert_expected_messages (); # 264| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:267:7: warning[deadcode.DeadStores]: Value stored to 'str_cpy_end' is never read # 265| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 266| "*assertion*!= NULL*"); # 267|-> str_cpy_end = g_stpcpy (NULL, str); # 268| g_test_assert_expected_messages (); # 269| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:411:7: warning[deadcode.DeadStores]: Value stored to 'str' is never read # 409| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 410| "*assertion*!= NULL*"); # 411|-> str = g_ascii_strdown (NULL, 0); # 412| g_test_assert_expected_messages (); # 413| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:460:7: warning[deadcode.DeadStores]: Value stored to 'str' is never read # 458| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 459| "*assertion*!= NULL*"); # 460|-> str = g_ascii_strup (NULL, 0); # 461| g_test_assert_expected_messages (); # 462| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:656:7: warning[deadcode.DeadStores]: Value stored to 'str' is never read # 654| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 655| "*assertion*!= NULL*"); # 656|-> str = g_strjoinv (NULL, NULL); # 657| g_test_assert_expected_messages (); # 658| } Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘do_test_strchug’ glib-2.80.0/glib/tests/strfuncs.c:928:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/gstring.h:37: included_from: Included from here. glib-2.80.0/glib/giochannel.h:36: included_from: Included from here. glib-2.80.0/glib/glib.h:56: included_from: Included from here. glib-2.80.0/glib/tests/strfuncs.c:37: included_from: Included from here. glib-2.80.0/glib/tests/strfuncs.c:925:9: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘do_test_strchug’ glib-2.80.0/glib/tests/strfuncs.c:36: included_from: Included from here. /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 926| # 927| g_strchug (tmp); # 928|-> res = (strcmp (tmp, expected) == 0); # 929| g_free (tmp); # 930| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘do_test_strchomp’ glib-2.80.0/glib/tests/strfuncs.c:964:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/tests/strfuncs.c:961:9: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘do_test_strchomp’ /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 962| # 963| g_strchomp (tmp); # 964|-> res = (strcmp (tmp, expected) == 0); # 965| g_free (tmp); # 966| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1010:7: warning[deadcode.DeadStores]: Value stored to 'tokens' is never read # 1008| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1009| "*assertion*!= NULL*"); # 1010|-> tokens = g_str_tokenize_and_fold (NULL, local_str, NULL); # 1011| g_test_assert_expected_messages (); # 1012| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1088:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1086| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1087| "*assertion*!= NULL*"); # 1088|-> res = g_strstr_len (NULL, 0, "xxx"); # 1089| g_test_assert_expected_messages (); # 1090| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1093:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1091| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1092| "*assertion*!= NULL*"); # 1093|-> res = g_strstr_len ("xxx", 0, NULL); # 1094| g_test_assert_expected_messages (); # 1095| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1124:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1122| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1123| "*assertion*!= NULL*"); # 1124|-> res = g_strrstr (NULL, "xxx"); # 1125| g_test_assert_expected_messages (); # 1126| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1129:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1127| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1128| "*assertion*!= NULL*"); # 1129|-> res = g_strrstr ("xxx", NULL); # 1130| g_test_assert_expected_messages (); # 1131| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1152:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1150| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1151| "*assertion*!= NULL*"); # 1152|-> res = g_strrstr_len (NULL, 14, "xxx"); # 1153| g_test_assert_expected_messages (); # 1154| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1157:7: warning[deadcode.DeadStores]: Value stored to 'res' is never read # 1155| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1156| "*assertion*!= NULL*"); # 1157|-> res = g_strrstr_len ("xxx", 14, NULL); # 1158| g_test_assert_expected_messages (); # 1159| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1238:7: warning[deadcode.DeadStores]: Value stored to 'string' is never read # 1236| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1237| "*assertion*!= NULL*"); # 1238|-> string = g_strdelimit (NULL, "ABCDE", 'N'); # 1239| g_test_assert_expected_messages (); # 1240| } Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘check_strtod_string’ glib-2.80.0/glib/tests/strfuncs.c:1630:49: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/strfuncs.c:1629:7: note: in expansion of macro ‘g_assert_true’ glib-2.80.0/glib/tests/strfuncs.c:1619:12: note: in expansion of macro ‘g_strdup’ glib-2.80.0/glib/tests/strfuncs.c: scope_hint: In function ‘check_strtod_string’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/strfuncs.c:1629:7: note: in expansion of macro ‘g_assert_true’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/strfuncs.c:1629:7: note: in expansion of macro ‘g_assert_true’ glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:228:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/strfuncs.c:1629:7: note: in expansion of macro ‘g_assert_true’ <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 1628| g_assert_true (isnan (res) ? isnan (d) : (d == res)); # 1629| g_assert_true ((gsize) (end - number) == # 1630|-> (check_end ? correct_len : strlen (number))); # 1631| } # 1632| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:1677:7: warning[deadcode.DeadStores]: Value stored to 'd' is never read # 1675| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 1676| "*assertion*!= NULL*"); # 1677|-> d = g_ascii_strtod (NULL, NULL); # 1678| g_test_assert_expected_messages (); # 1679| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:2110:7: warning[deadcode.DeadStores]: Value stored to 's' is never read # 2108| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 2109| "*assertion*!= NULL*"); # 2110|-> s = g_strup (NULL); # 2111| g_test_assert_expected_messages (); # 2112| Error: CLANG_WARNING: glib-2.80.0/glib/tests/strfuncs.c:2115:7: warning[deadcode.DeadStores]: Value stored to 's' is never read # 2113| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 2114| "*assertion*!= NULL*"); # 2115|-> s = g_strdown (NULL); # 2116| g_test_assert_expected_messages (); # 2117| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/string.c: scope_hint: In function ‘test_string_new_take’ glib-2.80.0/glib/tests/string.c:729:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(10)’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 727| GString *string; # 728| # 729|-> strcpy (test_str, test_str_const); # 730| g_assert_cmpstr (test_str, ==, test_str_const); # 731| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/testing.c: scope_hint: In function ‘test_tap_subtest_stdout’ glib-2.80.0/glib/tests/testing.c:2572:23: warning[-Wanalyzer-null-argument]: use of NULL ‘interesting_lines’ where non-null expected glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/tests/testing.c:33: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/testing.c:2570:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/tests/testing.c:2570:3: note: in expansion of macro ‘g_assert_nonnull’ <built-in>: note: argument 1 of ‘__builtin_strstr’ must be non-null # 2570| g_assert_nonnull (interesting_lines); # 2571| # 2572|-> interesting_lines = strstr (interesting_lines, TAP_SUBTEST_PREFIX "# /sub-stdout"); # 2573| g_assert_nonnull (interesting_lines); # 2574| Error: GCC_ANALYZER_WARNING (CWE-688): glib-2.80.0/glib/tests/testing.c: scope_hint: In function ‘test_tap_subtest_stdout_no_new_line’ glib-2.80.0/glib/tests/testing.c:2628:23: warning[-Wanalyzer-null-argument]: use of NULL ‘interesting_lines’ where non-null expected glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:255:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/testing.c:2626:3: note: in expansion of macro ‘g_assert_nonnull’ glib-2.80.0/glib/tests/testing.c:2626:3: note: in expansion of macro ‘g_assert_nonnull’ <built-in>: note: argument 1 of ‘__builtin_strstr’ must be non-null # 2626| g_assert_nonnull (interesting_lines); # 2627| # 2628|-> interesting_lines = strstr (interesting_lines, TAP_SUBTEST_PREFIX "# /sub-stdout-no-nl"); # 2629| g_assert_nonnull (interesting_lines); # 2630| Error: CLANG_WARNING: glib-2.80.0/glib/tests/unicode-encoding.c:81:7: warning[deadcode.DeadStores]: Value stored to 'ucs4_result' is never read # 79| gunichar *ucs4_result; # 80| # 81|-> ucs4_result = g_utf8_to_ucs4 (utf8, -1, NULL, NULL, &error); # 82| # 83| g_assert_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT); Error: CLANG_WARNING: glib-2.80.0/glib/tests/unicode.c:459:7: warning[deadcode.DeadStores]: Value stored to 'str_up' is never read # 457| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 458| "*assertion*!= NULL*"); # 459|-> str_up = g_utf8_strup (NULL, 0); # 460| g_test_assert_expected_messages (); # 461| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/unicode.c:488:7: warning[deadcode.DeadStores]: Value stored to 'str_down' is never read # 486| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 487| "*assertion*!= NULL*"); # 488|-> str_down = g_utf8_strdown (NULL, 0); # 489| g_test_assert_expected_messages (); # 490| } Error: CLANG_WARNING: glib-2.80.0/glib/tests/unicode.c:584:7: warning[deadcode.DeadStores]: Value stored to 'str_casefold' is never read # 582| g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, # 583| "*assertion*!= NULL*"); # 584|-> str_casefold = g_utf8_casefold (NULL, 0); # 585| g_test_assert_expected_messages (); # 586| } Error: GCC_ANALYZER_WARNING: glib-2.80.0/glib/tests/unix.c: scope_hint: In function ‘test_pipe_stdio_overwrite’ glib-2.80.0/glib/tests/unix.c:303:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘stdin_fd’ glib-2.80.0/glib/glib.h:89: included_from: Included from here. glib-2.80.0/glib/glib-private.h:23: included_from: Included from here. glib-2.80.0/glib/tests/unix.c:29: included_from: Included from here. glib-2.80.0/glib/tests/unix.c:286:3: note: in expansion of macro ‘g_assert_cmpint’ # 301| g_assert_no_error (error); # 302| # 303|-> ret = dup2 (stdin_fd, STDIN_FILENO); # 304| g_assert_cmpint (ret, >=, 0); # 305| Error: GCC_ANALYZER_WARNING (CWE-775): glib-2.80.0/glib/tests/unix.c:308:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’ glib-2.80.0/glib/tests/unix.c:286:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/unix.c:286:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/unix.c:304:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/glib/tests/unix.c:304:3: note: in expansion of macro ‘g_assert_cmpint’ # 306| g_close (stdin_fd, &error); # 307| g_assert_no_error (error); # 308|-> } # 309| # 310| static void Error: CLANG_WARNING: glib-2.80.0/glib/tests/uri.c:1608:11: warning[deadcode.DeadStores]: Value stored to 'uri_len' is never read # 1606| if (use_nul_terminated) # 1607| { # 1608|-> uri_len = -1; # 1609| uri = g_strdup (params_tests[i].uri); # 1610| } Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/glib/tests/utils.c: scope_hint: In function ‘strv_check’ glib-2.80.0/glib/tests/utils.c:55:9: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (3 consumed) glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/glib/tests/utils.c:30: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/utils.c:98:3: note: in expansion of macro ‘g_assert’ # 53| for (i = 0; strv[i]; i++) # 54| { # 55|-> s = va_arg (args, gchar*); # 56| if (g_strcmp0 (strv[i], s) != 0) # 57| { Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/glib/tests/utils.c:55:9: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (5 consumed) glib-2.80.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/glib/tests/utils.c:75:3: note: in expansion of macro ‘g_assert’ # 53| for (i = 0; strv[i]; i++) # 54| { # 55|-> s = va_arg (args, gchar*); # 56| if (g_strcmp0 (strv[i], s) != 0) # 57| { Error: CLANG_WARNING: glib-2.80.0/gobject/gclosure.c:628:3: warning[unix.Malloc]: Use of memory after it is freed # 626| g_closure_invalidate (closure); # 627| # 628|-> DEC_ASSIGN (closure, ref_count, &new_ref_count); # 629| # 630| if (new_ref_count == 0) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gobject.c: scope_hint: In function ‘object_remove_closure’ glib-2.80.0/gobject/gobject.c:5174:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 5172| object_bit_lock (object, OPTIONAL_BIT_LOCK_CLOSURE_ARRAY); # 5173| carray = g_object_get_qdata (object, quark_closure_array); # 5174|-> for (i = 0; i < carray->n_closures; i++) # 5175| if (carray->closures[i] == closure) # 5176| { Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gparam.c: scope_hint: In function ‘should_list_pspec’ glib-2.80.0/gobject/gparam.c:1293:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pspec’ # 1291| return FALSE; # 1292| # 1293|-> found = param_spec_ht_lookup (ht, pspec->name, owner_type, TRUE); # 1294| if (found != pspec) # 1295| { Error: CLANG_WARNING: glib-2.80.0/gobject/gparamspecs.c:813:7: warning[deadcode.DeadStores]: Value stored to 'string' is never read # 811| value->data[0].v_pointer = g_strdup (""); # 812| changed++; # 813|-> string = value->data[0].v_pointer; # 814| } # 815| Error: CLANG_WARNING: glib-2.80.0/gobject/gparamspecs.c:967:14: warning[core.NullDereference]: Access to field 'n_values' results in a dereference of a null pointer (loaded from variable 'value_array') # 965| if (fixed_n_elements) # 966| { # 967|-> while (value_array->n_values < fixed_n_elements) # 968| { # 969| g_value_array_append (value_array, NULL); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gsignal.c: scope_hint: In function ‘g_signal_override_class_closure.part.0’ glib-2.80.0/gobject/gsignal.c:1980:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gobject/gtype.h:760:35: note: in definition of macro ‘g_type_is_a’ glib-2.80.0/gobject/gsignal.c: scope_hint: In function ‘g_signal_override_class_closure.part.0’ glib-2.80.0/gobject/gtype.h:760:35: note: in definition of macro ‘g_type_is_a’ # 1978| node = LOOKUP_SIGNAL_NODE (signal_id); # 1979| node_check_deprecated (node); # 1980|-> if (!g_type_is_a (instance_type, node->itype)) # 1981| g_critical ("%s: type '%s' cannot be overridden for signal id '%u'", G_STRLOC, type_debug_name (instance_type), signal_id); # 1982| else Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gsignal.c: scope_hint: In function ‘node_check_deprecated’ glib-2.80.0/gobject/gsignal.c:2447:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’ glib-2.80.0/gobject/gsignal.c: scope_hint: In function ‘node_check_deprecated’ # 2445| if (g_enable_diagnostic[0] == '1') # 2446| { # 2447|-> if (node->flags & G_SIGNAL_DEPRECATED) # 2448| { # 2449| g_warning ("The signal %s::%s is deprecated and shouldn't be used " Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘type_node_fundamental_new_W’ glib-2.80.0/gobject/gtype.c:535:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gtype.h:26: included_from: Included from here. glib-2.80.0/gobject/gtype.c:29: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:526:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:527:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:527:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:427:3: note: in expansion of macro ‘g_assert’ glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘type_node_fundamental_new_W’ # 533| # 534| finfo = type_node_fundamental_info_I (node); # 535|-> finfo->type_flags = type_flags & TYPE_FUNDAMENTAL_FLAG_MASK; # 536| # 537| return node; Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘check_type_info_I’ glib-2.80.0/gobject/gtype.c:884:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘check_type_info_I’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:1219:7: note: in expansion of macro ‘g_assert’ glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘check_type_info_I’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtype.c:881:3: note: in expansion of macro ‘g_assert’ # 882| # 883| /* check instance members */ # 884|-> if (!(finfo->type_flags & G_TYPE_FLAG_INSTANTIATABLE) && # 885| (info->instance_size || info->instance_init)) # 886| { Error: CLANG_WARNING: glib-2.80.0/gobject/gtype.c:1201:34: warning[core.NullDereference]: Access to field 'value_init' results in a dereference of a null pointer (loaded from field 'value_table') # 1199| } # 1200| node->data->common.value_table = vtable; # 1201|-> node->mutatable_check_cache = (node->data->common.value_table->value_init != NULL && # 1202| !((G_TYPE_FLAG_VALUE_ABSTRACT | G_TYPE_FLAG_ABSTRACT) & # 1203| GPOINTER_TO_UINT (type_get_qdata_L (node, static_quark_type_flags)))); Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘_g_type_test_flags’ glib-2.80.0/gobject/gtype.c:3991:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘_g_type_test_flags’ glib-2.80.0/gobject/gtype.c: scope_hint: In function ‘_g_type_test_flags’ # 3989| GTypeFundamentalInfo *finfo = type_node_fundamental_info_I (node); # 3990| # 3991|-> fflags = (finfo->type_flags & fflags) == fflags; # 3992| } # 3993| else Error: GCC_ANALYZER_WARNING (CWE-457): glib-2.80.0/gio/tests/pollable.c: scope_hint: In function ‘test_pollable_converter’ glib-2.80.0/gobject/gtype.h:2656:42: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefds[0]’ glib-2.80.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/ginputstream.h:35:38: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/pollable.c:295:11: note: in expansion of macro ‘G_INPUT_STREAM’ glib-2.80.0/gio/tests/pollable.c:293:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gio/tests/pollable.c:293:3: note: in expansion of macro ‘g_assert_cmpint’ glib-2.80.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’ glib-2.80.0/gio/ginputstream.h:35:38: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’ glib-2.80.0/gio/tests/pollable.c:295:11: note: in expansion of macro ‘G_INPUT_STREAM’ # 2654| /* --- implementation bits --- */ # 2655| #if defined(G_DISABLE_CAST_CHECKS) || defined(__OPTIMIZE__) # 2656|-> # define _G_TYPE_CIC(ip, gt, ct) ((ct*) (void *) ip) # 2657| # define _G_TYPE_CCC(cp, gt, ct) ((ct*) (void *) cp) # 2658| #else Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_type_info’ glib-2.80.0/gobject/gtypemodule.c:335:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_type_info’ # 333| ModuleTypeInfo *module_type_info = g_type_module_find_type_info (module, g_type); # 334| # 335|-> *info = module_type_info->info; # 336| # 337| if (module_type_info->info.value_table) Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_interface_info’ glib-2.80.0/gobject/gtypemodule.c:350:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_interface_info’ # 348| ModuleInterfaceInfo *module_interface_info = g_type_module_find_interface_info (module, instance_type, interface_type); # 349| # 350|-> *info = module_interface_info->info; # 351| } # 352| Error: GCC_ANALYZER_WARNING (CWE-476): glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_register_type’ glib-2.80.0/gobject/gtypemodule.c:420:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ glib-2.80.0/redhat-linux-build/glib/glibconfig.h:9: included_from: Included from here. glib-2.80.0/glib/gtypes.h:34: included_from: Included from here. glib-2.80.0/glib/galloca.h:34: included_from: Included from here. glib-2.80.0/glib/glib.h:32: included_from: Included from here. glib-2.80.0/gobject/gtype.h:26: included_from: Included from here. glib-2.80.0/gobject/gtypeplugin.h:26: included_from: Included from here. glib-2.80.0/gobject/gtypemodule.c:24: included_from: Included from here. glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtypemodule.c:388:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtypemodule.c:389:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ glib-2.80.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ glib-2.80.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ glib-2.80.0/gobject/gtypemodule.c:389:3: note: in expansion of macro ‘g_return_val_if_fail’ glib-2.80.0/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_register_type’ # 418| module_type_info = g_type_module_find_type_info (module, type); # 419| # 420|-> if (module_type_info->parent_type != parent_type) # 421| { # 422| const gchar *parent_type_name = g_type_name (parent_type); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/autoptr.c:166:5: warning[deadcode.DeadStores]: Value stored to 'l' is never read # 164| # 165| l = g_slist_prepend (l, tac1); # 166|-> l = g_slist_prepend (l, tac2); # 167| } # 168| Error: CLANG_WARNING: glib-2.80.0/gobject/tests/binding.c:649:3: warning[deadcode.DeadStores]: Value stored to 'binding' is never read # 647| g_object_set (target, "bar", 49, NULL); # 648| # 649|-> binding = g_object_bind_property (source, "foo", # 650| target, "bar", # 651| G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/defaultiface.c:173:3: warning[deadcode.DeadStores]: Value stored to 'dynamic_iface' is never read # 171| # 172| /* Peek returns NULL */ # 173|-> dynamic_iface = g_type_default_interface_peek (TEST_TYPE_DYNAMIC_IFACE); # 174| #if 0 # 175| /* Disabled as unloading dynamic types is disabled. Error: CLANG_WARNING: glib-2.80.0/gobject/tests/dynamictype.c:141:3: warning[deadcode.DeadStores]: Value stored to 'class' is never read # 139| # 140| /* Peek returns NULL */ # 141|-> class = g_type_class_peek (DYNAMIC_OBJECT_TYPE); # 142| #if 0 # 143| /* Disabled as unloading dynamic types is disabled. Error: CLANG_WARNING: glib-2.80.0/gobject/tests/dynamictype.c:157:3: warning[deadcode.DeadStores]: Value stored to 'class' is never read # 155| /* And Unref causes finalize once more*/ # 156| g_type_class_unref (class); # 157|-> class = g_type_class_peek (DYNAMIC_OBJECT_TYPE); # 158| #if 0 # 159| /* Disabled as unloading dynamic types is disabled. Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/performance/performance-threaded.c: scope_hint: In function ‘simple_register_class’ glib-2.80.0/gobject/tests/performance/performance-threaded.c:37:17: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘GType’ {aka ‘long unsigned int’} but received ‘int’ for variadic argument 1 of ‘args’ # 35| for (;;) # 36| { # 37|-> interface = va_arg (args, GType); # 38| if (interface == 0) # 39| break; Error: CLANG_WARNING: glib-2.80.0/gobject/tests/signal-handler.c:88:5: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 86| # 87| for (i = 0; i < n_handlers; i++) # 88|-> g_signal_handler_disconnect (o, handlers[i]); # 89| # 90| time_elapsed = g_test_timer_elapsed (); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/signal-handler.c:151:5: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 149| # 150| for (i = 0; i < n_handlers; i++) # 151|-> g_signal_handler_disconnect (o, handlers[i]); # 152| # 153| time_elapsed = g_test_timer_elapsed (); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/signal-handler.c:192:5: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 190| # 191| for (i = 0; i < n_handlers; i++) # 192|-> g_signal_handler_disconnect (o, handlers[i]); # 193| # 194| time_elapsed = g_test_timer_elapsed (); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/signal-handler.c:245:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 243| # 244| for (i = 0; i < n_handlers; i++) # 245|-> g_signal_handler_disconnect (objects[i], handlers[i]); # 246| # 247| time_elapsed = g_test_timer_elapsed (); Error: CLANG_WARNING: glib-2.80.0/gobject/tests/signal-handler.c:283:5: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 281| # 282| for (i = 0; i < n_handlers; i++) # 283|-> g_signal_handler_block (o, handlers[i]); # 284| # 285| for (i = n_handlers; i > 0; i--) Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘int’ for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ # 115| # 116| va_start (var_args, value); # 117|-> G_VALUE_COLLECT (value, var_args, 0, &error); # 118| va_end (var_args); # 119| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘int’ for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ # 115| # 116| va_start (var_args, value); # 117|-> G_VALUE_COLLECT (value, var_args, 0, &error); # 118| va_end (var_args); # 119| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘void *’ but received ‘int’ for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ # 115| # 116| va_start (var_args, value); # 117|-> G_VALUE_COLLECT (value, var_args, 0, &error); # 118| va_end (var_args); # 119| Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/gobject/tests/value.c: scope_hint: In function ‘collect’ glib-2.80.0/gobject/tests/value.c:117:3: warning[-Wanalyzer-va-list-exhausted]: ‘var_args’ has no more arguments (1 consumed) glib-2.80.0/gobject/tests/value.c:31: included_from: Included from here. glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ glib-2.80.0/gobject/gvaluecollector.h:85:5: note: in expansion of macro ‘G_VALUE_COLLECT_INIT2’ glib-2.80.0/gobject/gvaluecollector.h:174:3: note: in expansion of macro ‘G_VALUE_COLLECT_INIT’ glib-2.80.0/gobject/tests/value.c:117:3: note: in expansion of macro ‘G_VALUE_COLLECT’ (12) ‘var_args’ has no more arguments (1 consumed) # 115| # 116| va_start (var_args, value); # 117|-> G_VALUE_COLLECT (value, var_args, 0, &error); # 118| va_end (var_args); # 119| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘gchar *’ {aka ‘char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘gint *’ {aka ‘int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘guchar *’ {aka ‘unsigned char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘guint *’ {aka ‘unsigned int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c: scope_hint: In function ‘lcopy’ glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘gchar *’ {aka ‘char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘gint *’ {aka ‘int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘guchar *’ {aka ‘unsigned char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘guint *’ {aka ‘unsigned int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘gchar *’ {aka ‘char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘gint *’ {aka ‘int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘guchar *’ {aka ‘unsigned char *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-686): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘guint *’ {aka ‘unsigned int *’} for variadic argument 1 of ‘var_args’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: GCC_ANALYZER_WARNING (CWE-685): glib-2.80.0/gobject/tests/value.c:132:3: warning[-Wanalyzer-va-list-exhausted]: ‘var_args’ has no more arguments (1 consumed) glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ glib-2.80.0/gobject/tests/value.c:132:3: note: in expansion of macro ‘G_VALUE_LCOPY’ (12) ‘var_args’ has no more arguments (1 consumed) # 130| # 131| va_start (var_args, value); # 132|-> G_VALUE_LCOPY (value, var_args, 0, &error); # 133| va_end (var_args); # 134| Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspect3edh5pi1/GLibUnix-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspect4i14qeqh/Gio-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspect7atdw2g_/GioUnix-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspectbkn9wg11/GModule-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspectjgoez2l4/GObject-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspectnw1j2yrr/GIRepository-3.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') Error: CLANG_WARNING: glib-2.80.0/redhat-linux-build/tmp-introspecttm7n10gh/GLib-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')