Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-670): [#def1]
gtk-4.18.2/demos/gtk-demo/main.c: scope_hint: In function ‘activate_about’
gtk-4.18.2/demos/gtk-demo/main.c:195:74: warning[-Wduplicated-branches]: this condition has identical branches
#  195 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  193|                                PACKAGE_VERSION,
#  194|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  195|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  196|                                gtk_get_major_version (),
#  197|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670): [#def2]
gtk-4.18.2/demos/gtk-demo/main.c: scope_hint: In function ‘main’
gtk-4.18.2/demos/gtk-demo/main.c:1136:59: warning[-Wduplicated-branches]: this condition has identical branches
# 1136 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
# 1134|                 PACKAGE_VERSION,
# 1135|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
# 1136|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
# 1137|   
# 1138|     g_application_set_version (G_APPLICATION (app), version);

Error: COMPILER_WARNING (CWE-670): [#def3]
gtk-4.18.2/demos/node-editor/node-editor-application.c: scope_hint: In function ‘activate_about’
gtk-4.18.2/demos/node-editor/node-editor-application.c:104:74: warning[-Wduplicated-branches]: this condition has identical branches
#  104 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  102|                                PACKAGE_VERSION,
#  103|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  104|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  105|                                gtk_get_major_version (),
#  106|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670): [#def4]
gtk-4.18.2/demos/node-editor/node-editor-application.c: scope_hint: In function ‘node_editor_application_new’
gtk-4.18.2/demos/node-editor/node-editor-application.c:272:59: warning[-Wduplicated-branches]: this condition has identical branches
#  272 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
#  270|                 PACKAGE_VERSION,
#  271|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  272|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#  273|   
#  274|     app = g_object_new (NODE_EDITOR_APPLICATION_TYPE,

Error: COMPILER_WARNING (CWE-670): [#def5]
gtk-4.18.2/demos/print-editor/print-editor.c: scope_hint: In function ‘activate_about’
gtk-4.18.2/demos/print-editor/print-editor.c:611:74: warning[-Wduplicated-branches]: this condition has identical branches
#  611 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  609|                                PACKAGE_VERSION,
#  610|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  611|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  612|                                gtk_get_major_version (),
#  613|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670): [#def6]
gtk-4.18.2/demos/print-editor/print-editor.c: scope_hint: In function ‘main’
gtk-4.18.2/demos/print-editor/print-editor.c:895:59: warning[-Wduplicated-branches]: this condition has identical branches
#  895 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
#  893|                 PACKAGE_VERSION,
#  894|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  895|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#  896|   
#  897|     g_application_set_version (G_APPLICATION (app), version);

Error: COMPILER_WARNING (CWE-670): [#def7]
gtk-4.18.2/demos/widget-factory/widget-factory.c: scope_hint: In function ‘activate_about’
gtk-4.18.2/demos/widget-factory/widget-factory.c:329:74: warning[-Wduplicated-branches]: this condition has identical branches
#  329 |                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#      |                                                                          ^
#  327|                                PACKAGE_VERSION,
#  328|                                g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
#  329|->                              g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "",
#  330|                                gtk_get_major_version (),
#  331|                                gtk_get_minor_version (),

Error: COMPILER_WARNING (CWE-670): [#def8]
gtk-4.18.2/demos/widget-factory/widget-factory.c: scope_hint: In function ‘main’
gtk-4.18.2/demos/widget-factory/widget-factory.c:2599:59: warning[-Wduplicated-branches]: this condition has identical branches
# 2599 |               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
#      |                                                           ^
# 2597|                 PACKAGE_VERSION,
# 2598|                 g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
# 2599|->               g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
# 2600|     g_application_set_version (G_APPLICATION (app), version);
# 2601|   

Error: COMPILER_WARNING: [#def9]
gtk-4.18.2/redhat-linux-build/g-ir-cpp-2zr2o5pf.c:17: included_from: Included from here.
gtk-4.18.2/gsk/gl/gskglrenderer.h:23:2: warning[-Wcpp]: #warning "#include <gsk/gsk.h> instead of <gsk/gl/gskglrenderer.h> to avoid this warning"
#   23 | #warning "#include <gsk/gsk.h> instead of <gsk/gl/gskglrenderer.h> to avoid this warning"
#      |  ^~~~~~~
#   21|   #pragma once
#   22|   
#   23|-> #warning "#include <gsk/gsk.h> instead of <gsk/gl/gskglrenderer.h> to avoid this warning"
#   24|   
#   25|   #include <gsk/gsk.h>

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
gtk-4.18.2/redhat-linux-build/../gdk/gdkglcontext.c:2172:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 2170|     gdk_dmabuf_egl_init (display);
# 2171|   
# 2172|->   if (gdk_dmabuf_formats_contains (display->egl_internal_formats, dmabuf->fourcc, dmabuf->modifier))
# 2173|       {
# 2174|         target = GL_TEXTURE_2D;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
gtk-4.18.2/redhat-linux-build/../gdk/wayland/cursor/xcursor.c:402:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.type’
gtk-4.18.2/redhat-linux-build/../gdk/wayland/cursor/xcursor.c:644:1: enter_function: entry to ‘xcursor_load_images’
gtk-4.18.2/redhat-linux-build/../gdk/wayland/cursor/xcursor.c:650:6: branch_false: following ‘false’ branch...
gtk-4.18.2/redhat-linux-build/../gdk/wayland/cursor/xcursor.c:653:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gdk/wayland/cursor/xcursor.c:653:12: call_function: calling ‘XcursorFileLoadImages’ from ‘xcursor_load_images’
#  400|       for (n = 0; n < fileHeader->ntoc; n++)
#  401|       {
#  402|-> 	if (fileHeader->tocs[n].type != XCURSOR_IMAGE_TYPE)
#  403|   	    continue;
#  404|   	thisSize = fileHeader->tocs[n].subtype;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def12]
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1380:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1859:1: enter_function: entry to ‘end_element’
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1878:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1909:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1909:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1933:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1933:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1934:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1933:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1987:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1987:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1995:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:1995:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2007:12: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2011:41: call_function: calling ‘state_pop’ from ‘end_element’
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2011:41: return_function: returning to ‘end_element’ from ‘state_pop’
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2012:33: call_function: calling ‘state_peek’ from ‘end_element’
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2012:33: return_function: returning to ‘end_element’ from ‘state_peek’
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2015:10: branch_false: following ‘false’ branch...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2021:15: branch_false: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2021:15: branch_true: following ‘true’ branch...
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2025:30: branch_true: ...to here
gtk-4.18.2/redhat-linux-build/../gtk/gtkbuilderparser.c:2025:30: call_function: calling ‘expression_info_construct’ from ‘end_element’
# 1378|           for (l = info->closure.params; l; l = l->next)
# 1379|             {
# 1380|->             params[--i] = expression_info_construct (builder, l->data, error);
# 1381|               if (params[i] == NULL)
# 1382|                 return NULL;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-29.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namegtk4-4.19.0-1.fc43
diffbase-store-results-to/tmp/tmpmmpa4epi/gtk4-4.19.0-1.fc43.tar.xz
diffbase-time-created2025-04-25 13:21:21
diffbase-time-finished2025-04-25 13:44:35
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpmmpa4epi/gtk4-4.19.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpmmpa4epi/gtk4-4.19.0-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-29.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namegtk4-4.18.2-1.fc42
store-results-to/tmp/tmpkcw0magq/gtk4-4.18.2-1.fc42.tar.xz
time-created2025-04-25 12:57:12
time-finished2025-04-25 13:20:56
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpkcw0magq/gtk4-4.18.2-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpkcw0magq/gtk4-4.18.2-1.fc42.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9