Fixed defects
List of Defects
Error: CPPCHECK_WARNING: [#def1]
glib2-2.80.0-build/glib-2.80.0/gio/gemblemedicon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
glib2-2.80.0-build/glib-2.80.0/gio/ginetaddressmask.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def3]
glib2-2.80.0-build/glib-2.80.0/gio/gnetworkmonitorbase.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
glib2-2.80.0-build/glib-2.80.0/gio/gnetworkmonitornetlink.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def5]
glib2-2.80.0-build/glib-2.80.0/gio/gresourcefile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def6]
glib2-2.80.0-build/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: CPPCHECK_WARNING: [#def7]
glib2-2.80.0-build/glib-2.80.0/gio/gzlibcompressor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def8]
glib2-2.80.0-build/glib-2.80.0/gio/gzlibdecompressor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def9]
glib2-2.80.0-build/glib-2.80.0/gio/tests/gdbus-example-proxy-subclass.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_list_append’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:112:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:15: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:16: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:20: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:574:10: note: in expansion of macro ‘_xdg_glob_determine_type’
glib2-2.80.0-build/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): [#def11]
glib2-2.80.0-build/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
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/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: CLANG_WARNING: [#def12]
glib2-2.80.0-build/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): [#def13]
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:579:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(glob)’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/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): [#def14]
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c: scope_hint: In function ‘_xdg_glob_list_append’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:579:33: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(mime_type)’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/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: [#def15]
glib2-2.80.0-build/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): [#def16]
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:585:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(glob)’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:28:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:628:1: note: in expansion of macro ‘_xdg_mime_glob_read_from_file’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:705:7: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/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): [#def17]
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:585:30: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(mime_type)’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:28:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:628:1: note: in expansion of macro ‘_xdg_mime_glob_read_from_file’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:705:7: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:32:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.c:563:1: note: in expansion of macro ‘_xdg_glob_hash_append_glob’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:29:43: note: in expansion of macro ‘_XDG_RESERVED_ENTRY3’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmime.h:28:34: note: in expansion of macro ‘_XDG_RESERVED_ENTRY2’
glib2-2.80.0-build/glib-2.80.0/gio/xdgmime/xdgmimeglob.h:33:47: note: in expansion of macro ‘XDG_RESERVED_ENTRY’
glib2-2.80.0-build/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: CLANG_WARNING: [#def18]
glib2-2.80.0-build/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: COMPILER_WARNING (CWE-704): [#def19]
glib2-2.80.0-build/glib-2.80.0/glib/gthread.h:34: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/glib/gasyncqueue.h:34: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/glib/glib.h:34: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/glib/tests/atomic.c:14: included_from: Included from here.
glib2-2.80.0-build/glib-2.80.0/glib/tests/atomic.c: scope_hint: In function ‘test_types’
glib2-2.80.0-build/glib-2.80.0/glib/gatomic.h:140:5: warning[-Wdiscarded-qualifiers]: argument 2 of ‘__atomic_store’ discards ‘volatile’ qualifier
glib2-2.80.0-build/glib-2.80.0/glib/tests/atomic.c:139:3: note: in expansion of macro ‘g_atomic_pointer_set’
# 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-465): [#def20]
glib2-2.80.0-build/glib-2.80.0/glib/gdataset.c: scope_hint: In function ‘g_dataset_destroy_internal’
glib2-2.80.0-build/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: CLANG_WARNING: [#def21]
glib2-2.80.0-build/glib-2.80.0/glib/gspawn.c:61: included_from: Included from here.
glib2-2.80.0-build/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: CLANG_WARNING: [#def22]
glib2-2.80.0-build/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: [#def23]
glib2-2.80.0-build/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: [#def24]
glib2-2.80.0-build/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: [#def25]
glib2-2.80.0-build/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: COMPILER_WARNING: [#def26]
glib2-2.80.0-build/glib-2.80.0/glib/gvariant.c: scope_hint: In function ‘g_variant_dict_new’
glib2-2.80.0-build/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: COMPILER_WARNING: [#def27]
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc_a’
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’
# 45 | code; \
# | ^~~~
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/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: [#def28]
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc_b’
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’
# 45 | code; \
# | ^~~~
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/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: [#def29]
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc0_a’
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’
# 45 | code; \
# | ^~~~
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/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: [#def30]
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c: scope_hint: In function ‘mem_overflow_aligned_alloc0_b’
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/glib-2.80.0/glib/tests/mem-overflow.c:45:3: note: in definition of macro ‘MEM_OVERFLOW_TEST_FULL’
# 45 | code; \
# | ^~~~
glib2-2.80.0-build/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)
# | ^
glib2-2.80.0-build/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: [#def31]
glib2-2.80.0-build/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);
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-142.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | glib2-2.80.3-1.fc41 |
diffbase-store-results-to | /tmp/tmpxtz03tpx/glib2-2.80.3-1.fc41.tar.xz |
diffbase-time-created | 2024-07-03 13:03:01 |
diffbase-time-finished | 2024-07-03 13:16:46 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpxtz03tpx/glib2-2.80.3-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpxtz03tpx/glib2-2.80.3-1.fc41.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-142.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | glib2-2.80.0-1.fc40 |
store-results-to | /tmp/tmpjqrfrym5/glib2-2.80.0-1.fc40.tar.xz |
time-created | 2024-07-03 12:49:19 |
time-finished | 2024-07-03 13:02:30 |
title | Fixed defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpjqrfrym5/glib2-2.80.0-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpjqrfrym5/glib2-2.80.0-1.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |