Fixed defects

List of Defects

Error: CPPCHECK_WARNING: [#def1]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
/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.
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:35: included_from: Included from here.
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c: scope_hint: In function ‘virtual_dir_lookup’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:183:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dir’
/usr/include/glib-2.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:183:3: note: in expansion of macro ‘g_assert’
/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.
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:204:15: note: in expansion of macro ‘g_strdup’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c: scope_hint: In function ‘virtual_dir_lookup’
/usr/include/glib-2.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:183:3: note: in expansion of macro ‘g_assert’
#  181|     VirtualNode *node;
#  182|     
#  183|->   g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);
#  184|     
#  185|     for (l = dir->children; l != NULL; l = l->next)

Error: CLANG_WARNING: [#def3]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:273:13: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'dir')
#  271|                   VirtualNode *node)
#  272|   {
#  273|->   g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);
#  274|     
#  275|     dir->children = g_list_remove (dir->children, node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c: scope_hint: In function ‘virtual_unlink’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:273:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dir’
/usr/include/glib-2.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:273:3: note: in expansion of macro ‘g_assert’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:204:15: note: in expansion of macro ‘g_strdup’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c: scope_hint: In function ‘virtual_unlink’
/usr/include/glib-2.0/glib/gmacros.h:1237:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:273:3: note: in expansion of macro ‘g_assert’
#  271|                   VirtualNode *node)
#  272|   {
#  273|->   g_assert (dir->type == VIRTUAL_NODE_DIRECTORY);
#  274|     
#  275|     dir->children = g_list_remove (dir->children, node);

Error: CLANG_WARNING: [#def5]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:759:3: warning[deadcode.DeadStores]: Value stored to 'file' is never read
#  757|       }
#  758|   
#  759|->   file = virtual_mkdir (dir, basename);
#  760|     g_free (basename);
#  761|     

Error: CLANG_WARNING: [#def6]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:932:7: warning[deadcode.DeadStores]: Value stored to 'file' is never read
#  930|       {
#  931|         basename = g_path_get_basename (destination);
#  932|->       file = virtual_create (G_VFS_BACKEND_BURN (backend),
#  933|                                dir,
#  934|                                basename,

Error: CLANG_WARNING: [#def7]
gvfs-1.54.0-build/gvfs-1.54.0/daemon/gvfsbackendburn.c:1018:45: warning[core.NullDereference]: Access to field 'children' results in a dereference of a null pointer (loaded from variable 'source_dir')
# 1016|     if (source_dir != dest_dir)
# 1017|       {
# 1018|->       source_dir->children = g_list_remove (source_dir->children, source_node);
# 1019|         dest_dir->children = g_list_append (dest_dir->children, source_node);
# 1020|       }

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-72.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namegvfs-1.55.1-1.fc41
diffbase-store-results-to/tmp/tmpoiw7iun8/gvfs-1.55.1-1.fc41.tar.xz
diffbase-time-created2024-07-03 13:30:24
diffbase-time-finished2024-07-03 13:34:31
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpoiw7iun8/gvfs-1.55.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpoiw7iun8/gvfs-1.55.1-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-72.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namegvfs-1.54.0-2.fc40
store-results-to/tmp/tmpa2h_zair/gvfs-1.54.0-2.fc40.tar.xz
time-created2024-07-03 13:25:16
time-finished2024-07-03 13:29:55
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpa2h_zair/gvfs-1.54.0-2.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpa2h_zair/gvfs-1.54.0-2.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9