Fixed defects

List of Defects

Error: CPPCHECK_WARNING: [#def1]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/redhat-linux-build/goa-scan.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/redhat-linux-build/goa-scan.c:308:16: warning[deadcode.DeadStores]: Although the value stored to 'event_num' is used in the enclosing expression, the value is never actually read from 'event_num'

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c: scope_hint: In function ‘goa_smtp_auth_run_sync’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:496:28: warning[-Wanalyzer-null-argument]: use of NULL ‘*auth.username’ where non-null expected
/usr/include/glib-2.0/glib/glist.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/ghash.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
/usr/include/glib-2.0/glib/gi18n-lib.h:23: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:23: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:432:3: note: in expansion of macro ‘g_clear_pointer’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:440:3: note: in expansion of macro ‘g_debug’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:166:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:144:7: note: in expansion of macro ‘g_str_has_prefix’
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:144:7: note: in expansion of macro ‘g_str_has_prefix’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:166:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:112:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:112:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:446:7: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:473:3: note: in expansion of macro ‘g_clear_pointer’
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:495:24: note: in expansion of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c: scope_hint: In function ‘goa_smtp_auth_run_sync’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  494|   
#  495|         auth_arg_plain = g_strdup (self->username);
#  496|->       auth_arg_plain_len = strlen (self->username);
#  497|         auth_arg_base64 = g_base64_encode ((guchar *) auth_arg_plain, auth_arg_plain_len);
#  498|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def4]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:516:28: warning[-Wanalyzer-null-argument]: use of NULL ‘*auth.password’ where non-null expected
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:432:3: note: in expansion of macro ‘g_clear_pointer’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:440:3: note: in expansion of macro ‘g_debug’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:166:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:144:7: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:144:7: note: in expansion of macro ‘g_str_has_prefix’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:166:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:112:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:112:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:446:7: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:473:3: note: in expansion of macro ‘g_clear_pointer’
/usr/include/glib-2.0/glib/gstrfuncs.h:324:38: note: in definition of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:503:7: note: in expansion of macro ‘g_clear_pointer’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:508:7: note: in expansion of macro ‘g_debug’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gstrfuncs.h:166:11: note: in expansion of macro ‘G_UNLIKELY’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:128:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:128:8: note: in expansion of macro ‘g_str_has_prefix’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c:515:24: note: in expansion of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goasmtpauth.c: scope_hint: In function ‘goa_smtp_auth_run_sync’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  514|   
#  515|         auth_arg_plain = g_strdup (self->password);
#  516|->       auth_arg_plain_len = strlen (self->password);
#  517|         auth_arg_base64 = g_base64_encode ((guchar *) auth_arg_plain, auth_arg_plain_len);
#  518|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c: scope_hint: In function ‘dav_normalize_uri’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c:219:19: warning[-Wanalyzer-null-argument]: use of NULL ‘uri_string’ where non-null expected
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
/usr/include/glib-2.0/glib/gi18n-lib.h:23: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c:24: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c:161:12: note: in expansion of macro ‘g_str_equal’
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c:164:20: note: in expansion of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c: scope_hint: In function ‘dav_normalize_uri’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c:218:21: note: in expansion of macro ‘g_strdup’
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goabackend/goawebdavprovider.c: scope_hint: In function ‘dav_normalize_uri’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  217|         path = g_uri_get_path (uri_out);
#  218|         pretty_path = g_strdup (path);
#  219|->       pretty_path[strlen(pretty_path) - 1] = '\0';
#  220|   
#  221|         *server = g_strconcat (g_uri_get_host (uri), (port == std_port || port == -1) ? "" : port_string, pretty_path, NULL);

Error: CLANG_WARNING: [#def6]
gnome-online-accounts-3.50.0-build/gnome-online-accounts-3.50.0/src/goaidentity/goakerberosidentitymanager.c:1325:11: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1323|         name = goa_kerberos_identity_get_principal_name (GOA_KERBEROS_IDENTITY (identity));
# 1324|   
# 1325|->       if (other_identity_needs_rename)
# 1326|           {
# 1327|             GoaIdentity *other_identity = other_identities->next->data;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-192.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namegnome-online-accounts-3.50.2-1.fc41
diffbase-store-results-to/tmp/tmpp0n_k_43/gnome-online-accounts-3.50.2-1.fc41.tar.xz
diffbase-time-created2024-07-03 12:59:38
diffbase-time-finished2024-07-03 13:02:05
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpp0n_k_43/gnome-online-accounts-3.50.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpp0n_k_43/gnome-online-accounts-3.50.2-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-192.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namegnome-online-accounts-3.50.0-2.fc40
store-results-to/tmp/tmp83rcj1kj/gnome-online-accounts-3.50.0-2.fc40.tar.xz
time-created2024-07-03 12:56:14
time-finished2024-07-03 12:59:17
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp83rcj1kj/gnome-online-accounts-3.50.0-2.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp83rcj1kj/gnome-online-accounts-3.50.0-2.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9