Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
vim92/src/auto/gui_gtk_gresources.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def2]
vim92/src/auto/wayland/primary-selection-unstable-v1.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def3]
vim92/src/auto/wayland/xdg-shell.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
vim92/src/clientserver.c:962:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘w’
vim92/src/clientserver.c:889:8: branch_false: following ‘false’ branch...
vim92/src/clientserver.c:893:8: branch_false: following ‘false’ branch...
vim92/src/clientserver.c:896:9: branch_false: ...to here
vim92/src/clientserver.c:901:8: branch_false: following ‘false’ branch...
vim92/src/clientserver.c:903:12: branch_false: ...to here
vim92/src/clientserver.c:908:8: branch_false: following ‘false’ branch...
vim92/src/clientserver.c:914:9: branch_false: ...to here
vim92/src/clientserver.c:914:8: branch_false: following ‘false’ branch...
vim92/src/clientserver.c:940:5: branch_false: ...to here
vim92/src/clientserver.c:942:8: branch_true: following ‘true’ branch...
vim92/src/clientserver.c:953:17: branch_true: ...to here
vim92/src/clientserver.c:954:12: branch_true: following ‘true’ branch...
vim92/src/clientserver.c:961:16: branch_true: following ‘true’ branch...
vim92/src/clientserver.c:962:17: branch_true: ...to here
vim92/src/clientserver.c:962:17: danger: use of uninitialized value ‘w’ here
#  960|   #  ifdef FEAT_X11
#  961|   	    if (clientserver_method == CLIENTSERVER_METHOD_X11)
#  962|-> 		sprintf((char *)str, PRINTF_HEX_LONG_U, (long_u)w);
#  963|   #  endif
#  964|   #  ifdef FEAT_SOCKETSERVER

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
vim92/src/clipboard.c:317:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cbd’
vim92/src/clipboard.c:3170:1: enter_function: entry to ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:3175:32: call_function: inlined call to ‘clip_wl_get_cbd_from_selection’ from ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:3177:5: call_function: calling ‘clip_lose_selection’ from ‘vwl_data_source_listener_event_cancelled’
#  315|   {
#  316|   # ifdef FEAT_X11
#  317|->     int	    was_owned = cbd->owned;
#  318|   # endif
#  319|       int     visual_selection = FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
vim92/src/clipboard.c:2812:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
vim92/src/clipboard.c:2882:1: enter_function: entry to ‘clip_reset_wayland’
vim92/src/clipboard.c:2886:8: branch_false: following ‘false’ branch...
vim92/src/clipboard.c:2887:16: branch_false: ...to here
vim92/src/clipboard.c:2887:16: call_function: calling ‘clip_init_wayland’ from ‘clip_reset_wayland’
# 2810|   	clip_wl.regular.requires_focus = true;
# 2811|       if (clip_wl.primary.available
# 2812|-> 	    && clip_wl.primary.manager->protocol == VWL_DATA_PROTOCOL_PRIMARY
# 2813|   	    && clip_wl_focus_stealing_available())
# 2814|   	clip_wl.primary.requires_focus = true;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
vim92/src/ex_cmds.c:3133:54: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘oldwin’
vim92/src/ex_cmds.c:2795:27: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:2798:9: branch_false: ...to here
vim92/src/ex_cmds.c:2798:8: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:2802:8: branch_false: ...to here
vim92/src/ex_cmds.c:2802:8: branch_false: following ‘false’ branch (when ‘eap’ is NULL)...
vim92/src/ex_cmds.c:2804:5: branch_false: ...to here
vim92/src/ex_cmds.c:2808:12: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:2875:23: branch_false: ...to here
vim92/src/ex_cmds.c:2896:8: branch_false: following ‘false’ branch (when ‘oldwin’ is NULL)...
vim92/src/ex_cmds.c:2896:8: branch_false: ...to here
vim92/src/ex_cmds.c:2931:8: branch_true: following ‘true’ branch (when ‘other_file != 0’)...
vim92/src/ex_cmds.c:2933:35: branch_true: ...to here
vim92/src/ex_cmds.c:2981:12: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
vim92/src/ex_cmds.c:2985:13: branch_false: ...to here
vim92/src/ex_cmds.c:2985:12: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:2996:19: branch_false: ...to here
vim92/src/ex_cmds.c:3034:12: branch_true: following ‘true’ branch...
vim92/src/ex_cmds.c:3037:25: branch_true: ...to here
vim92/src/ex_cmds.c:3043:13: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3046:13: branch_false: ...to here
vim92/src/ex_cmds.c:3047:13: release_memory: ‘oldwin’ is NULL
vim92/src/ex_cmds.c:3059:16: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3061:13: branch_false: ...to here
vim92/src/ex_cmds.c:3068:16: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3076:17: branch_false: ...to here
vim92/src/ex_cmds.c:3076:16: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3083:17: branch_false: ...to here
vim92/src/ex_cmds.c:3083:16: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3087:30: branch_false: ...to here
vim92/src/ex_cmds.c:3120:20: branch_false: following ‘false’ branch...
vim92/src/ex_cmds.c:3127:21: branch_false: ...to here
vim92/src/ex_cmds.c:3127:20: branch_true: following ‘true’ branch...
vim92/src/ex_cmds.c:3131:24: branch_true: ...to here
vim92/src/ex_cmds.c:3133:24: branch_true: following ‘true’ branch...
vim92/src/ex_cmds.c:3133:54: branch_true: ...to here
vim92/src/ex_cmds.c:3133:54: danger: dereference of NULL ‘oldwin’
# 3131|   		    if (did_decrement && buf_valid(was_curbuf))
# 3132|   			++was_curbuf->b_nwindows;
# 3133|-> 		    if (win_valid_any_tab(oldwin) && oldwin->w_buffer == NULL)
# 3134|   			oldwin->w_buffer = was_curbuf;
# 3135|   		    auto_buf = TRUE;

Error: COMPILER_WARNING: [#def8]
vim92/src/gui_beval.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def9]
vim92/src/gui_gtk.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def10]
vim92/src/gui_gtk_f.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def11]
vim92/src/gui_gtk_x11.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def12]
vim92/src/if_lua.c:218:11: warning: ‘luaL_openlibs’ redefined
#  218 | #  define luaL_openlibs dll_luaL_openlibs
#      |           ^~~~~~~~~~~~~
vim92/src/if_lua.c:16: included_from: Included from here.
/usr/include/lualib.h:62:9: note: this is the location of the previous definition
#   62 | #define luaL_openlibs(L)        luaL_openselectedlibs(L, ~0, 0)
#      |         ^~~~~~~~~~~~~
#  216|   #  define luaopen_package dll_luaopen_package
#  217|   #  define luaopen_debug dll_luaopen_debug
#  218|-> #  define luaL_openlibs dll_luaL_openlibs
#  219|   
#  220|   // lauxlib

Error: COMPILER_WARNING: [#def13]
vim92/src/if_lua.c:218:11: warning[warning]: ‘luaL_openlibs’ redefined
#  216|   #  define luaopen_package dll_luaopen_package
#  217|   #  define luaopen_debug dll_luaopen_debug
#  218|-> #  define luaL_openlibs dll_luaL_openlibs
#  219|   
#  220|   // lauxlib

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-219.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.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namevim-9.2.530-1.fc45
diffbase-store-results-to/tmp/tmpk9_8wad3/vim-9.2.530-1.fc45.tar.xz
diffbase-time-created2026-06-01 17:55:02
diffbase-time-finished2026-06-01 18:41:16
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpk9_8wad3/vim-9.2.530-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpk9_8wad3/vim-9.2.530-1.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-219.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namevim-9.2.240-1.fc44
store-results-to/tmp/tmp6fy22zyo/vim-9.2.240-1.fc44.tar.xz
time-created2026-06-01 17:10:07
time-finished2026-06-01 17:54:36
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp6fy22zyo/vim-9.2.240-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp6fy22zyo/vim-9.2.240-1.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9