vim-9.1.309-1.fc41

List of Defects

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/vim-default-editor.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> # Ensure vim is set as EDITOR if it isn't already set
#    2|   
#    3|   if [ -z "$EDITOR" ]; then

Error: SHELLCHECK_WARNING (CWE-156): [#def2]
/usr/bin/gvimtutor:8:6: warning[SC2046]: Quote this to prevent word splitting.
#    6|   # See vimtutor for usage.
#    7|   
#    8|-> exec $(dirname $0)/vimtutor -g "$@"

Error: SHELLCHECK_WARNING (CWE-398): [#def3]
/usr/bin/vimtutor:28:39: warning[SC2186]: tempfile is deprecated. Use mktemp instead.
#   26|   # We need a temp file for the copy.  First try using a standard command.
#   27|   tmp="${TMPDIR-/tmp}"
#   28|-> TUTORCOPY=`mktemp $tmp/tutorXXXXXX || tempfile -p tutor || echo none`
#   29|   
#   30|   # If the standard commands failed then create a directory to put the copy in.

Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/usr/bin/vimtutor:53:14: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
#   51|   
#   52|   # remove the copy of the tutor on exit
#   53|-> trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
#   54|   
#   55|   for i in $seq; do

Error: SHELLCHECK_WARNING (CWE-398): [#def5]
/usr/bin/vimtutor:53:33: error[SC2173]: SIGKILL/SIGSTOP can not be trapped.
#   51|   
#   52|   # remove the copy of the tutor on exit
#   53|-> trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
#   54|   
#   55|   for i in $seq; do

Error: SHELLCHECK_WARNING (CWE-398): [#def6]
/usr/bin/vimtutor:53:35: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
#   51|   
#   52|   # remove the copy of the tutor on exit
#   53|-> trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
#   54|   
#   55|   for i in $seq; do

Error: SHELLCHECK_WARNING (CWE-398): [#def7]
/usr/bin/vimtutor:53:38: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
#   51|   
#   52|   # remove the copy of the tutor on exit
#   53|-> trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15
#   54|   
#   55|   for i in $seq; do

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

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

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

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

Error: COMPILER_WARNING: [#def12]
vim91/src/auto/if_perl.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def13]
vim91/src/auto/pathdef.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def14]
vim91/src/autocmd.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
vim91/src/autocmd.c: scope_hint: In function ‘do_autocmd_event’
vim91/src/autocmd.c:1192:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pat’
vim91/src/vim.h:457: included_from: Included from here.
vim91/src/autocmd.c:14: included_from: Included from here.
vim91/src/autocmd.c:3034:5: note: in expansion of macro ‘FOR_ALL_LIST_ITEMS’
vim91/src/autocmd.c:3034:5: note: in expansion of macro ‘FOR_ALL_LIST_ITEMS’
vim91/src/autocmd.c:3036:9: note: in expansion of macro ‘VIM_CLEAR’
vim91/src/autocmd.c:3036:9: note: in expansion of macro ‘VIM_CLEAR’
vim91/src/autocmd.c:3037:9: note: in expansion of macro ‘VIM_CLEAR’
vim91/src/autocmd.c:3037:9: note: in expansion of macro ‘VIM_CLEAR’
# 1190|        * Show or delete all patterns for an event.
# 1191|        */
# 1192|->     if (*pat == NUL)
# 1193|       {
# 1194|   	FOR_ALL_AUTOCMD_PATTERNS(event, ap)

Error: CLANG_WARNING: [#def16]
vim91/src/autocmd.c:1713:32: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>=' is a garbage value
# 1711|       win_T   *save_curwin;
# 1712|   
# 1713|->     if (aco->use_aucmd_win_idx >= 0)
# 1714|       {
# 1715|   	win_T *awp = aucmd_win[aco->use_aucmd_win_idx].auc_win;

Error: COMPILER_WARNING: [#def17]
vim91/src/beval.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def18]
vim91/src/beval.c:82:15: warning[core.NullDereference]: Access to field 'lnum' results in a dereference of a null pointer (loaded from variable 'spos')
#   80|   	if (VIsual_active
#   81|   		&& wp->w_buffer == curwin->w_buffer
#   82|-> 		&& (lnum == spos->lnum
#   83|   		    ? col >= (int)spos->col
#   84|   		    : lnum > spos->lnum)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
vim91/src/beval.c: scope_hint: In function ‘find_word_under_cursor’
vim91/src/beval.c:82:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘spos’
#   80|   	if (VIsual_active
#   81|   		&& wp->w_buffer == curwin->w_buffer
#   82|-> 		&& (lnum == spos->lnum
#   83|   		    ? col >= (int)spos->col
#   84|   		    : lnum > spos->lnum)

Error: COMPILER_WARNING: [#def20]
vim91/src/blob.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def21]
vim91/src/blowfish.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def22]
vim91/src/buffer.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def23]
vim91/src/bufwrite.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def24]
vim91/src/bufwrite.c:67:11: warning[core.NullDereference]: Dereference of null pointer
#   65|   	if (flags & FIO_ENDIAN_L)
#   66|   	{
#   67|-> 	    *p++ = c;
#   68|   	    *p++ = (c >> 8);
#   69|   	    *p++ = (c >> 16);

Error: CLANG_WARNING: [#def25]
vim91/src/bufwrite.c:74:11: warning[core.NullDereference]: Dereference of null pointer
#   72|   	else
#   73|   	{
#   74|-> 	    *p++ = (c >> 24);
#   75|   	    *p++ = (c >> 16);
#   76|   	    *p++ = (c >> 8);

Error: CLANG_WARNING: [#def26]
vim91/src/bufwrite.c:94:12: warning[core.NullDereference]: Dereference of null pointer
#   92|   		if (flags & FIO_ENDIAN_L)
#   93|   		{
#   94|-> 		    *p++ = cc;
#   95|   		    *p++ = ((unsigned)cc >> 8);
#   96|   		}

Error: CLANG_WARNING: [#def27]
vim91/src/bufwrite.c:99:12: warning[core.NullDereference]: Dereference of null pointer
#   97|   		else
#   98|   		{
#   99|-> 		    *p++ = ((unsigned)cc >> 8);
#  100|   		    *p++ = cc;
#  101|   		}

Error: CLANG_WARNING: [#def28]
vim91/src/bufwrite.c:109:11: warning[core.NullDereference]: Dereference of null pointer
#  107|   	if (flags & FIO_ENDIAN_L)
#  108|   	{
#  109|-> 	    *p++ = c;
#  110|   	    *p++ = (c >> 8);
#  111|   	}

Error: CLANG_WARNING: [#def29]
vim91/src/bufwrite.c:114:11: warning[core.NullDereference]: Dereference of null pointer
#  112|   	else
#  113|   	{
#  114|-> 	    *p++ = (c >> 8);
#  115|   	    *p++ = c;
#  116|   	}

Error: CLANG_WARNING: [#def30]
vim91/src/bufwrite.c:123:11: warning[core.NullDereference]: Dereference of null pointer
#  121|   	{
#  122|   	    error = TRUE;
#  123|-> 	    *p++ = 0xBF;
#  124|   	}
#  125|   	else

Error: CLANG_WARNING: [#def31]
vim91/src/bufwrite.c:126:11: warning[core.NullDereference]: Dereference of null pointer
#  124|   	}
#  125|   	else
#  126|-> 	    *p++ = c;
#  127|       }
#  128|   

Error: CLANG_WARNING: [#def32]
vim91/src/bufwrite.c:236:30: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  234|   		{
#  235|   		    ip->bw_conv_error = TRUE;
#  236|-> 		    ip->bw_conv_error_lnum = ip->bw_start_lnum;
#  237|   		}
#  238|   		if (c == NL)

Error: CLANG_WARNING: [#def33]
vim91/src/bufwrite.c:239:7: warning[core.uninitialized.Assign]: The expression is an uninitialized value. The computed value will also be garbage
#  237|   		}
#  238|   		if (c == NL)
#  239|-> 		    ++ip->bw_start_lnum;
#  240|   	    }
#  241|   	    if (flags & FIO_LATIN1)

Error: CLANG_WARNING: [#def34]
vim91/src/bufwrite.c:1209:3: warning[deadcode.DeadStores]: Value stored to 'fd' is never read
# 1207|   		// arbitrary numbers).
# 1208|   		STRCPY(IObuff, fname);
# 1209|-> 		fd = -1;
# 1210|   		for (i = 4913; ; i += 123)
# 1211|   		{

Error: COMPILER_WARNING: [#def35]
vim91/src/change.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def36]
vim91/src/change.c:2126:28: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 2124|   	    int i;
# 2125|   	    int padding = second_line_indent
# 2126|-> 					  - (newindent + (int)STRLEN(leader));
# 2127|   
# 2128|   	    // Here whitespace is inserted after the comment char.

Error: CLANG_WARNING: [#def37]
vim91/src/change.c:2138:2: warning[unix.cstring.NullArg]: Null pointer passed as 1st argument to string concatenation function
# 2136|   	    }
# 2137|   	}
# 2138|-> 	STRCAT(leader, p_extra);
# 2139|   	p_extra = leader;
# 2140|   	did_ai = TRUE;	    // So truncating blanks works with comments

Error: COMPILER_WARNING: [#def38]
vim91/src/channel.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def39]
vim91/src/charset.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-457): [#def40]
vim91/src/charset.c:415: warning[uninitvar]: Uninitialized variable: ga.ga_data
#  413|       // Make each character lower case.
#  414|       i = 0;
#  415|->     while (STR_CHAR(i) != NUL)
#  416|       {
#  417|   	if (enc_utf8 || (has_mbyte && MB_BYTE2LEN(STR_CHAR(i)) > 1))

Error: COMPILER_WARNING: [#def41]
vim91/src/cindent.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-909): [#def42]
vim91/src/cindent.c:2461: error[uninitStructMember]: Uninitialized struct member: our_paren_pos.lnum
# 2459|   	    }
# 2460|   
# 2461|-> 	    amount = skip_label(our_paren_pos.lnum, &look);
# 2462|   	    look = skipwhite(look);
# 2463|   	    if (*look == '(')

Error: CPPCHECK_WARNING (CWE-909): [#def43]
vim91/src/cindent.c:2529: error[uninitStructMember]: Uninitialized struct member: our_paren_pos.col
# 2527|   		    else
# 2528|   		    {
# 2529|-> 			col = our_paren_pos.col + 1;
# 2530|   			while (VIM_ISWHITE(l[col]))
# 2531|   			    col++;

Error: COMPILER_WARNING: [#def44]
vim91/src/clientserver.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def45]
vim91/src/clipboard.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def46]
vim91/src/cmdexpand.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def47]
vim91/src/cmdexpand.c:367:45: warning[core.NullDereference]: Array access (from variable 'matches') results in a null pointer dereference
#  365|       if (showtail)
#  366|       {
#  367|-> 	columns += vim_strsize(showmatches_gettail(matches[0]));
#  368|   	columns -= vim_strsize(matches[0]);
#  369|       }

Error: GCC_ANALYZER_WARNING (CWE-131): [#def48]
vim91/src/cmdexpand.c: scope_hint: In function ‘ExpandFromContext’
vim91/src/cmdexpand.c:3083:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
# 3081|   								options);
# 3082|   
# 3083|->     *matches = (char_u **)"";
# 3084|       *numMatches = 0;
# 3085|       if (xp->xp_context == EXPAND_HELP)

Error: COMPILER_WARNING: [#def49]
vim91/src/cmdhist.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def50]
vim91/src/cmdhist.c:168:11: warning[core.NullDereference]: Array access (from variable 'temp') results in a null pointer dereference
#  166|   	{
#  167|   	    for (i = 0; i <= hisidx[type]; ++i)
#  168|-> 		temp[i] = history[type][i];
#  169|   	    j = i;
#  170|   	    for ( ; i <= newlen - (hislen - hisidx[type]); ++i)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
vim91/src/cmdhist.c: scope_hint: In function ‘init_history’
vim91/src/cmdhist.c:168:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘temp’
#  166|   	{
#  167|   	    for (i = 0; i <= hisidx[type]; ++i)
#  168|-> 		temp[i] = history[type][i];
#  169|   	    j = i;
#  170|   	    for ( ; i <= newlen - (hislen - hisidx[type]); ++i)

Error: CLANG_WARNING: [#def52]
vim91/src/cmdhist.c:181:15: warning[core.NullDereference]: Array access (from variable 'temp') results in a null pointer dereference
#  179|   	    {
#  180|   		if (i >= 0)		// copy newest entries
#  181|-> 		    temp[i] = history[type][j];
#  182|   		else			// remove older entries
#  183|   		    vim_free(history[type][j].hisstr);

Error: COMPILER_WARNING: [#def53]
vim91/src/crypt.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def54]
vim91/src/crypt.c:1028:2: warning[deadcode.DeadStores]: Value stored to 'p' is never read
# 1026|   	p += sizeof(memlimit);
# 1027|   	alg = crypt_char_to_int(p);
# 1028|-> 	p += sizeof(alg);
# 1029|   
# 1030|   #ifdef FEAT_EVAL

Error: COMPILER_WARNING: [#def55]
vim91/src/crypt_zip.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def56]
vim91/src/debugger.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def57]
vim91/src/debugger.c:981:10: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
#  979|   	{
#  980|   	    PEN_SET_PROFILING(pe);
#  981|-> 	    if (f)
#  982|   		PEN_SET_FORCEIT(pe);
#  983|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def58]
vim91/src/debugger.c: scope_hint: In function ‘has_profiling’
vim91/src/debugger.c:981:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘f’
vim91/src/debugger.c:14: included_from: Included from here.
vim91/src/debugger.c:973:9: note: in expansion of macro ‘STRCPY’
vim91/src/debugger.c: scope_hint: In function ‘has_profiling’
vim91/src/debugger.c:1066:13: note: in expansion of macro ‘STRCPY’
vim91/src/debugger.c: scope_hint: In function ‘has_profiling’
vim91/src/debugger.c:1075:15: note: in expansion of macro ‘DEBUGGY’
vim91/src/debugger.c: scope_hint: In function ‘has_profiling’
vim91/src/debugger.c:980:13: note: in expansion of macro ‘PEN_SET_PROFILING’
#  979|   	{
#  980|   	    PEN_SET_PROFILING(pe);
#  981|-> 	    if (f)
#  982|   		PEN_SET_FORCEIT(pe);
#  983|   	}

Error: COMPILER_WARNING: [#def59]
vim91/src/dict.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def60]
vim91/src/diff.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def61]
vim91/src/digraph.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def62]
vim91/src/drawline.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def63]
vim91/src/drawline.c:2601:7: warning[core.NullDereference]: Dereference of null pointer (loaded from field 'p_extra')
# 2599|   	    else
# 2600|   	    {
# 2601|-> 		c = *wlv.p_extra;
# 2602|   		if (has_mbyte)
# 2603|   		{

Error: CLANG_WARNING: [#def64]
vim91/src/drawline.c:3874:15: warning[core.NullDereference]: Dereference of null pointer (loaded from field 'p_extra')
# 3872|   		    || lcs_eol_one > 0
# 3873|   		    || (wlv.n_extra > 0 && (wlv.c_extra != NUL
# 3874|-> 						     || *wlv.p_extra != NUL))
# 3875|   #ifdef FEAT_PROP_POPUP
# 3876|   		    || text_prop_next <= last_textprop_text_idx

Error: COMPILER_WARNING: [#def65]
vim91/src/drawscreen.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def66]
vim91/src/drawscreen.c:3009:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 3007|   	    if (enc_utf8)
# 3008|   	    {
# 3009|-> 		mch_memmove(screenlineUC + r * cols,
# 3010|   			    ScreenLinesUC + LineOffset[cmdline_row + r],
# 3011|   			    (size_t)cols * sizeof(u8char_T));

Error: CLANG_WARNING: [#def67]
vim91/src/drawscreen.c:3013:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value
# 3011|   			    (size_t)cols * sizeof(u8char_T));
# 3012|   		for (i = 0; i < p_mco; ++i)
# 3013|-> 		    mch_memmove(screenlineC[i] + r * cols,
# 3014|   				ScreenLinesC[i] + LineOffset[cmdline_row + r],
# 3015|   				(size_t)cols * sizeof(u8char_T));

Error: CLANG_WARNING: [#def68]
vim91/src/drawscreen.c:3041:7: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 3039|   		if (enc_utf8)
# 3040|   		{
# 3041|-> 		    mch_memmove(ScreenLinesUC + off,
# 3042|   				screenlineUC + r * cols,
# 3043|   				(size_t)cols * sizeof(u8char_T));

Error: CLANG_WARNING: [#def69]
vim91/src/drawscreen.c:3046:24: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value
# 3044|   		    for (i = 0; i < p_mco; ++i)
# 3045|   			mch_memmove(ScreenLinesC[i] + off,
# 3046|-> 				    screenlineC[i] + r * cols,
# 3047|   				    (size_t)cols * sizeof(u8char_T));
# 3048|   		}

Error: CLANG_WARNING: [#def70]
vim91/src/drawscreen.c:3050:7: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 3048|   		}
# 3049|   		if (enc_dbcs == DBCS_JPNU)
# 3050|-> 		    mch_memmove(ScreenLines2 + off,
# 3051|   				screenline2 + r * cols,
# 3052|   				(size_t)cols * sizeof(schar_T));

Error: CLANG_WARNING: [#def71]
vim91/src/drawscreen.c:3065:6: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 3063|   	vim_free(screenlineUC);
# 3064|   	for (i = 0; i < p_mco; ++i)
# 3065|-> 	    vim_free(screenlineC[i]);
# 3066|       }
# 3067|       if (enc_dbcs == DBCS_JPNU)

Error: COMPILER_WARNING: [#def72]
vim91/src/edit.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-476): [#def73]
vim91/src/edit.c:2930: warning[nullPointer]: Possible null pointer dereference: last_ptr
# 2928|       // starts with ^D.	-- Acevedo
# 2929|       last_ptr = (esc_ptr ? esc_ptr : ptr + STRLEN(ptr)) - 1;
# 2930|->     if (last_ptr >= ptr && (*last_ptr == '0' || *last_ptr == '^')
# 2931|   	    && (no_esc || (*ptr == Ctrl_D && count > 1)))
# 2932|       {

Error: CLANG_WARNING: [#def74]
vim91/src/edit.c:3257:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 3255|   	    p = ml_get_cursor();
# 3256|   	    ins_len = ml_get_cursor_len() - orig_len;
# 3257|-> 	    vcol = start_vcol;
# 3258|   	    for (i = 0; i < ins_len; ++i)
# 3259|   	    {

Error: CLANG_WARNING: [#def75]
vim91/src/edit.c:4351:40: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 4349|   		     * character.
# 4350|   		     */
# 4351|-> 		    if (enc_utf8 && p_deco && cpc[0] != NUL)
# 4352|   			inc_cursor();
# 4353|   #ifdef FEAT_RIGHTLEFT

Error: COMPILER_WARNING: [#def76]
vim91/src/eval.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def77]
vim91/src/evalbuffer.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def78]
vim91/src/evalfunc.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-457): [#def79]
vim91/src/evalfunc.c: scope_hint: In function ‘execute_common’
vim91/src/evalfunc.c:4356:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘save_ga.ga_len’
# 4354|       redir_execute = save_redir_execute;
# 4355|       if (redir_execute)
# 4356|-> 	redir_execute_ga = save_ga;
# 4357|       redir_off = save_redir_off;
# 4358|   

Error: COMPILER_WARNING: [#def80]
vim91/src/evalvars.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def81]
vim91/src/evalwindow.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def82]
vim91/src/ex_cmds.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
vim91/src/ex_cmds.c: scope_hint: In function ‘do_ecmd’
vim91/src/ex_cmds.c:2883:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘oldwin’
vim91/src/vim.h:495: included_from: Included from here.
vim91/src/ex_cmds.c:14: included_from: Included from here.
# 2881|   		    if (did_decrement && buf_valid(was_curbuf))
# 2882|   			++was_curbuf->b_nwindows;
# 2883|-> 		    if (win_valid_any_tab(oldwin) && oldwin->w_buffer == NULL)
# 2884|   			oldwin->w_buffer = was_curbuf;
# 2885|   		    auto_buf = TRUE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
vim91/src/ex_cmds.c: scope_hint: In function ‘ex_substitute’
vim91/src/ex_cmds.c:4092:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sub’
# 4090|        * again.
# 4091|        */
# 4092|->     if (sub[0] == '\\' && sub[1] == '=')
# 4093|       {
# 4094|   	p = vim_strsave(sub);

Error: COMPILER_WARNING: [#def85]
vim91/src/ex_cmds2.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def86]
vim91/src/ex_cmds2.c:634:8: warning[core.NullDereference]: Access to field 'w_next' results in a dereference of a null pointer (loaded from variable 'curwin')
#  632|   		if (curwin != wp)
#  633|   		    break;  // something must be wrong
#  634|-> 		wp = curwin->w_next;
#  635|   	    }
#  636|   	    else if (eap->cmdidx == CMD_tabdo)

Error: CLANG_WARNING: [#def87]
vim91/src/ex_cmds2.c:642:8: warning[core.NullDereference]: Access to field 'tp_next' results in a dereference of a null pointer (loaded from variable 'tp')
#  640|   		    break;
#  641|   		goto_tabpage_tp(tp, TRUE, TRUE);
#  642|-> 		tp = tp->tp_next;
#  643|   	    }
#  644|   	    else if (eap->cmdidx == CMD_bufdo)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def88]
vim91/src/ex_cmds2.c: scope_hint: In function ‘ex_listdo’
vim91/src/ex_cmds2.c:642:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tp’
#  640|   		    break;
#  641|   		goto_tabpage_tp(tp, TRUE, TRUE);
#  642|-> 		tp = tp->tp_next;
#  643|   	    }
#  644|   	    else if (eap->cmdidx == CMD_bufdo)

Error: COMPILER_WARNING: [#def89]
vim91/src/ex_docmd.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def90]
vim91/src/ex_eval.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def91]
vim91/src/ex_eval.c: scope_hint: In function ‘report_pending’
vim91/src/ex_eval.c:853:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
#  851|   		mesg = (char *)vim_strnsave(IObuff, STRLEN(IObuff) + 4);
#  852|   		STRCAT(mesg, ": %s");
#  853|-> 		s = (char *)((except_T *)value)->value;
#  854|   	    }
#  855|   	    else if ((pending & CSTP_ERROR) && (pending & CSTP_INTERRUPT))

Error: COMPILER_WARNING: [#def92]
vim91/src/ex_getln.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def93]
vim91/src/fileio.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def94]
vim91/src/fileio.c:485:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  483|   	    !(perm & 0222) ||
#  484|   # endif
#  485|-> 				mch_access((char *)fname, W_OK))
#  486|   	    file_readonly = TRUE;
#  487|   	fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);

Error: COMPILER_WARNING: [#def95]
vim91/src/filepath.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def96]
vim91/src/findfile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def97]
vim91/src/float.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def98]
vim91/src/fold.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def99]
vim91/src/getchar.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def100]
vim91/src/gui.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
vim91/src/gui.c: scope_hint: In function ‘gui_do_fork’
vim91/src/gui.c:246:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
#  244|       {
#  245|   	emsg(_(e_failed_to_create_new_process_for_GUI));
#  246|-> 	return;
#  247|       }
#  248|       else if (pid > 0)	    // Parent

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
vim91/src/gui.c:246:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
#  244|       {
#  245|   	emsg(_(e_failed_to_create_new_process_for_GUI));
#  246|-> 	return;
#  247|       }
#  248|       else if (pid > 0)	    // Parent

Error: CPPCHECK_WARNING (CWE-457): [#def103]
vim91/src/gui.c:2326: warning[uninitvar]: Uninitialized variable: *s
# 2324|   
# 2325|   #ifdef FEAT_SIGN_ICONS
# 2326|->     if (*s == SIGN_BYTE
# 2327|   # ifdef FEAT_NETBEANS_INTG
# 2328|   	  || *s == MULTISIGN_BYTE

Error: CLANG_WARNING: [#def104]
vim91/src/gui.c:4527:19: warning[core.NullDereference]: Dereference of null pointer
# 4525|   	return;
# 4526|   
# 4527|->     if (!force && curwin->w_p_wrap && gui.prev_wrap)
# 4528|   	return;
# 4529|   

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

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

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

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

Error: CLANG_WARNING: [#def109]
vim91/src/gui_gtk_x11.c:505:20: warning[deadcode.DeadStores]: Value stored to 'hist' during its initialization is never read
#  503|   match_stale_width_height(int width, int height)
#  504|   {
#  505|->     resize_hist_T *hist = old_resize_hists;
#  506|   
#  507|       for (hist = old_resize_hists; hist != NULL; hist = hist->next)

Error: CLANG_WARNING: [#def110]
vim91/src/gui_gtk_x11.c:3290:6: warning[deadcode.DeadStores]: Value stored to 'image' is never read
# 3288|   
# 3289|   	    gtk_image_get_icon_name(image, &icon_name, NULL);
# 3290|-> 	    image = (GtkImage *)gtk_image_new_from_icon_name(
# 3291|   							 icon_name, icon_size);
# 3292|   	}

Error: COMPILER_WARNING: [#def111]
vim91/src/gui_xim.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def112]
vim91/src/hardcopy.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def113]
vim91/src/hashtab.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def114]
vim91/src/help.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-131): [#def115]
vim91/src/help.c: scope_hint: In function ‘find_help_tags’
vim91/src/help.c:554:14: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  552|       }
#  553|   
#  554|->     *matches = (char_u **)"";
#  555|       *num_matches = 0;
#  556|       flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE | TAG_NO_TAGFUNC;

Error: CLANG_WARNING: [#def116]
vim91/src/help.c:1137:11: warning[core.NullDereference]: Array access (via field 'ga_data') results in a null pointer dereference
# 1135|   	for (i = 1; i < ga.ga_len; ++i)
# 1136|   	{
# 1137|-> 	    p1 = ((char_u **)ga.ga_data)[i - 1];
# 1138|   	    p2 = ((char_u **)ga.ga_data)[i];
# 1139|   	    while (*p1 == *p2)

Error: CLANG_WARNING: [#def117]
vim91/src/help.c:1162:10: warning[core.NullDereference]: Array access (via field 'ga_data') results in a null pointer dereference
# 1160|   	for (i = 0; i < ga.ga_len; ++i)
# 1161|   	{
# 1162|-> 	    s = ((char_u **)ga.ga_data)[i];
# 1163|   	    if (STRNCMP(s, "help-tags\t", 10) == 0)
# 1164|   		// help-tags entry was added in formatted form

Error: COMPILER_WARNING: [#def118]
vim91/src/highlight.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def119]
vim91/src/highlight.c:2617:26: warning[core.NullDereference]: Access to field 'ae_attr' results in a dereference of a null pointer (loaded from variable 'taep')
# 2615|       {
# 2616|   	taep = &(((attrentry_T *)table->ga_data)[i]);
# 2617|-> 	if (	   aep->ae_attr == taep->ae_attr
# 2618|   		&& (
# 2619|   #ifdef FEAT_GUI

Error: COMPILER_WARNING: [#def120]
vim91/src/if_cscope.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
vim91/src/if_cscope.c: scope_hint: In function ‘cs_create_connection’
vim91/src/if_cscope.c:30:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘to_cs[1]’
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
vim91/src/if_cscope.c:12: included_from: Included from here.
vim91/src/if_cscope.c:2341:14: note: in expansion of macro ‘ALLOC_MULT’
vim91/src/os_unix.h:29: included_from: Included from here.
vim91/src/vim.h:251: included_from: Included from here.
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
#   28|   
#   29|   #define CSCOPE_SUCCESS		0
#   30|-> #define CSCOPE_FAILURE		-1
#   31|   
#   32|   #define	CSCOPE_DBFILE		"cscope.out"

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
vim91/src/if_cscope.c:30:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘to_cs[i]’
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
vim91/src/if_cscope.c:2341:14: note: in expansion of macro ‘ALLOC_MULT’
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
vim91/src/if_cscope.c:861:16: note: in expansion of macro ‘CSCOPE_FAILURE’
#   28|   
#   29|   #define CSCOPE_SUCCESS		0
#   30|-> #define CSCOPE_FAILURE		-1
#   31|   
#   32|   #define	CSCOPE_DBFILE		"cscope.out"

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
vim91/src/if_cscope.c:874:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(to_cs[0], 0)’
vim91/src/if_cscope.c:2341:14: note: in expansion of macro ‘ALLOC_MULT’
#  872|   	int argc = 0;
#  873|   
#  874|-> 	if (dup2(to_cs[0], STDIN_FILENO) == -1)
#  875|   	    PERROR("cs_create_connection 1");
#  876|   	if (dup2(from_cs[1], STDOUT_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
vim91/src/if_cscope.c:876:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_cs[1], 1)’
vim91/src/if_cscope.c:2341:14: note: in expansion of macro ‘ALLOC_MULT’
#  874|   	if (dup2(to_cs[0], STDIN_FILENO) == -1)
#  875|   	    PERROR("cs_create_connection 1");
#  876|-> 	if (dup2(from_cs[1], STDOUT_FILENO) == -1)
#  877|   	    PERROR("cs_create_connection 2");
#  878|   	if (dup2(from_cs[1], STDERR_FILENO) == -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
vim91/src/if_cscope.c:878:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_cs[1], 2)’
vim91/src/if_cscope.c:2341:14: note: in expansion of macro ‘ALLOC_MULT’
#  876|   	if (dup2(from_cs[1], STDOUT_FILENO) == -1)
#  877|   	    PERROR("cs_create_connection 2");
#  878|-> 	if (dup2(from_cs[1], STDERR_FILENO) == -1)
#  879|   	    PERROR("cs_create_connection 3");
#  880|   

Error: COMPILER_WARNING: [#def126]
vim91/src/if_lua.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_list_add’
vim91/src/if_lua.c:1002:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1000|   {
# 1001|       luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
# 1002|->     list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
# 1003|       typval_T v;
# 1004|       if (l->lv_lock)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_list_insert’
vim91/src/if_lua.c:1019:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1017|   {
# 1018|       luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
# 1019|->     list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
# 1020|       long pos = (long) luaL_optinteger(L, 3, 0);
# 1021|       listitem_T *li = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def129]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_blob_add’
vim91/src/if_lua.c:1288:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1286|   {
# 1287|       luaV_Blob *blo = luaV_checkudata(L, 1, LUAVIM_BLOB);
# 1288|->     blob_T *b = (blob_T *) luaV_checkcache(L, (void *) *blo);
# 1289|       if (b->bv_lock)
# 1290|   	luaL_error(L, "blob is locked");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def130]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_buffer_insert’
vim91/src/if_lua.c:1541:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1539|   {
# 1540|       luaV_Buffer *lb = luaV_checkudata(L, 1, LUAVIM_BUFFER);
# 1541|->     buf_T *b = (buf_T *) luaV_checkcache(L, (void *) *lb);
# 1542|       linenr_T last = b->b_ml.ml_line_count;
# 1543|       linenr_T n = (linenr_T) luaL_optinteger(L, 3, last);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def131]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_buffer_next’
vim91/src/if_lua.c:1576:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1574|   {
# 1575|       luaV_Buffer *b = luaV_checkudata(L, 1, LUAVIM_BUFFER);
# 1576|->     buf_T *buf = (buf_T *) luaV_checkcache(L, (void *) *b);
# 1577|       luaV_pushbuffer(L, buf->b_next);
# 1578|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def132]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_buffer_previous’
vim91/src/if_lua.c:1585:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1583|   {
# 1584|       luaV_Buffer *b = luaV_checkudata(L, 1, LUAVIM_BUFFER);
# 1585|->     buf_T *buf = (buf_T *) luaV_checkcache(L, (void *) *b);
# 1586|       luaV_pushbuffer(L, buf->b_prev);
# 1587|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def133]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_buffer_isvalid’
vim91/src/if_lua.c:1594:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1592|   {
# 1593|       luaV_Buffer *b = luaV_checkudata(L, 1, LUAVIM_BUFFER);
# 1594|->     luaV_getudata(L, *b);
# 1595|       lua_pushboolean(L, !lua_isnil(L, -1));
# 1596|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def134]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_window_next’
vim91/src/if_lua.c:1710:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1708|   {
# 1709|       luaV_Window *w = luaV_checkudata(L, 1, LUAVIM_WINDOW);
# 1710|->     win_T *win = (win_T *) luaV_checkcache(L, (void *) *w);
# 1711|       luaV_pushwindow(L, win->w_next);
# 1712|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def135]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_window_previous’
vim91/src/if_lua.c:1719:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1717|   {
# 1718|       luaV_Window *w = luaV_checkudata(L, 1, LUAVIM_WINDOW);
# 1719|->     win_T *win = (win_T *) luaV_checkcache(L, (void *) *w);
# 1720|       luaV_pushwindow(L, win->w_prev);
# 1721|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def136]
vim91/src/if_lua.c: scope_hint: In function ‘luaV_window_isvalid’
vim91/src/if_lua.c:1728:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1726|   {
# 1727|       luaV_Window *w = luaV_checkudata(L, 1, LUAVIM_WINDOW);
# 1728|->     luaV_getudata(L, *w);
# 1729|       lua_pushboolean(L, !lua_isnil(L, -1));
# 1730|       return 1;

Error: COMPILER_WARNING: [#def137]
vim91/src/if_perlsfio.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-562): [#def138]
vim91/src/if_py_both.h:1153: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning.
# 1151|       }
# 1152|   
# 1153|->     return ret;
# 1154|   }
# 1155|   

Error: COMPILER_WARNING: [#def139]
vim91/src/if_python3.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def140]
vim91/src/if_ruby.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def141]
vim91/src/if_xcmdsrv.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def142]
vim91/src/indent.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def143]
vim91/src/indent.c:205:28: warning[core.DivideZero]: Division by zero
#  203|   	int initspc = 0;
#  204|   
#  205|-> 	initspc = ts - (start_col % ts);
#  206|   	if (spaces >= initspc)
#  207|   	{

Error: COMPILER_WARNING: [#def144]
vim91/src/insexpand.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def145]
vim91/src/insexpand.c:660:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'p')
#  658|   		return (char_u *)"[failed]";
#  659|   	    }
#  660|-> 	    *p = NUL;
#  661|   	    STRCPY(gap.ga_data, IObuff);
#  662|   	    gap.ga_len = (int)STRLEN(IObuff);

Error: CLANG_WARNING: [#def146]
vim91/src/insexpand.c:667:13: warning[core.NullDereference]: Dereference of null pointer
#  665|   	    p += (*mb_char2bytes)(wca[i++], p);
#  666|   	else
#  667|-> 	    *(p++) = wca[i++];
#  668|       }
#  669|       vim_free(wca);

Error: CLANG_WARNING: [#def147]
vim91/src/insexpand.c:677:8: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'p')
#  675|       }
#  676|   
#  677|->     *p = NUL;
#  678|       return IObuff;
#  679|   }

Error: CLANG_WARNING: [#def148]
vim91/src/insexpand.c:2512:16: warning[core.NullDereference]: Access to field 'w_next' results in a dereference of a null pointer (loaded from variable 'wp')
# 2510|   	    // first call for this flag/expansion or window was closed
# 2511|   	    wp = curwin;
# 2512|-> 	while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
# 2513|   		&& wp->w_buffer->b_scanned)
# 2514|   	    ;

Error: COMPILER_WARNING: [#def149]
vim91/src/job.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def150]
vim91/src/json.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def151]
vim91/src/libvterm/src/encoding.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def152]
vim91/src/libvterm/src/keyboard.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-787): [#def153]
vim91/src/libvterm/src/keyboard.c: scope_hint: In function ‘vterm_keyboard_key’
vim91/src/libvterm/src/keyboard.c:168:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read
vim91/src/libvterm/src/keyboard.c:168:7: note: valid subscripts for ‘keycodes_fn’ are ‘[0]’ to ‘[12]’
#                                                       └─────────────────┘
#                                                                ^
#  166|       if((key - VTERM_KEY_FUNCTION_0) >= sizeof(keycodes_fn)/sizeof(keycodes_fn[0]))
#  167|         return;
#  168|->     k = keycodes_fn[key - VTERM_KEY_FUNCTION_0];
#  169|     }
#  170|     else if(key >= VTERM_KEY_KP_0) {

Error: GCC_ANALYZER_WARNING (CWE-787): [#def154]
vim91/src/libvterm/src/keyboard.c:173:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read
vim91/src/libvterm/src/keyboard.c:173:7: note: valid subscripts for ‘keycodes_kp’ are ‘[0]’ to ‘[17]’
#                                                       └─────────────────┘
#                                                                ^
#  171|       if((key - VTERM_KEY_KP_0) >= sizeof(keycodes_kp)/sizeof(keycodes_kp[0]))
#  172|         return;
#  173|->     k = keycodes_kp[key - VTERM_KEY_KP_0];
#  174|     }
#  175|   

Error: CPPCHECK_WARNING (CWE-909): [#def155]
vim91/src/libvterm/src/keyboard.c:176: error[uninitStructMember]: Uninitialized struct member: k.type
#  174|     }
#  175|   
#  176|->   switch(k.type) {
#  177|     case KEYCODE_NONE:
#  178|       break;

Error: COMPILER_WARNING: [#def156]
vim91/src/libvterm/src/mouse.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def157]
vim91/src/libvterm/src/parser.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def158]
vim91/src/libvterm/src/parser.c:343:11: warning[deadcode.DeadStores]: Value stored to 'string_len' is never read
#  341|             ENTER_STATE(SOS);
#  342|             string_start = bytes + pos + 1;
#  343|->           string_len = 0;
#  344|             break;
#  345|           case 0x9b: // CSI

Error: CLANG_WARNING: [#def159]
vim91/src/libvterm/src/parser.c:352:11: warning[deadcode.DeadStores]: Value stored to 'string_start' is never read
#  350|             vt->parser.v.osc.command = -1;
#  351|             vt->parser.string_initial = TRUE;
#  352|->           string_start = bytes + pos + 1;
#  353|             ENTER_STATE(OSC_COMMAND);
#  354|             break;

Error: CLANG_WARNING: [#def160]
vim91/src/libvterm/src/parser.c:359:11: warning[deadcode.DeadStores]: Value stored to 'string_len' is never read
#  357|             ENTER_STATE(PM);
#  358|             string_start = bytes + pos + 1;
#  359|->           string_len = 0;
#  360|             break;
#  361|           case 0x9f: // APC

Error: CLANG_WARNING: [#def161]
vim91/src/libvterm/src/parser.c:365:11: warning[deadcode.DeadStores]: Value stored to 'string_len' is never read
#  363|             ENTER_STATE(APC);
#  364|             string_start = bytes + pos + 1;
#  365|->           string_len = 0;
#  366|             break;
#  367|           default:

Error: COMPILER_WARNING: [#def162]
vim91/src/libvterm/src/pen.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def163]
vim91/src/libvterm/src/screen.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def164]
vim91/src/libvterm/src/state.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def165]
vim91/src/libvterm/src/unicode.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def166]
vim91/src/libvterm/src/vterm.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def167]
vim91/src/list.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def168]
vim91/src/locale.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def169]
vim91/src/logfile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def170]
vim91/src/vim.h:457: included_from: Included from here.
vim91/src/list.c:14: included_from: Included from here.
vim91/src/list.c: scope_hint: In function ‘list_append’
vim91/src/macros.h:409:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘l’
vim91/src/list.c:585:5: note: in expansion of macro ‘CHECK_LIST_MATERIALIZE’
vim91/src/list.c:585:5: note: in expansion of macro ‘CHECK_LIST_MATERIALIZE’
#  407|   #define CHECK_LIST_MATERIALIZE(l) \
#  408|       do { \
#  409|-> 	if ((l)->lv_first == &range_list_item) \
#  410|   	    range_list_materialize(l); \
#  411|       } while (0)

Error: COMPILER_WARNING: [#def171]
vim91/src/main.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def172]
vim91/src/map.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def173]
vim91/src/mark.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def174]
vim91/src/match.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def175]
vim91/src/match.c: scope_hint: In function ‘match_add’
vim91/src/match.c:46:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘grp’
vim91/src/match.c:14: included_from: Included from here.
vim91/src/vim.h:1737:50: note: in definition of macro ‘STRNICMP’
#   44|       int		rtype = UPD_SOME_VALID;
#   45|   
#   46|->     if (*grp == NUL || (pat != NULL && *pat == NUL))
#   47|   	return -1;
#   48|       if (id < -1 || id == 0)

Error: COMPILER_WARNING: [#def176]
vim91/src/mbyte.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
vim91/src/mbyte.c: scope_hint: In function ‘my_iconv_open’
vim91/src/mbyte.c:4811:8: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(enc_skip(to), enc_skip(from))’
vim91/src/mbyte.c:80: included_from: Included from here.
vim91/src/mbyte.c:5144:57: note: in expansion of macro ‘STRCMP’
vim91/src/mbyte.c:416:13: note: in expansion of macro ‘STRCMP’
vim91/src/mbyte.c:416:13: note: in expansion of macro ‘STRCMP’
# 4809|       fd = iconv_open((char *)enc_skip(to), (char *)enc_skip(from));
# 4810|   
# 4811|->     if (fd != (iconv_t)-1 && iconv_ok == -1)
# 4812|       {
# 4813|   	/*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def178]
vim91/src/mbyte.c: scope_hint: In function ‘convert_input_safe’
vim91/src/mbyte.c:5271:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘restp’
# 5269|   	{
# 5270|   	    // Move the unconverted characters to allocated memory.
# 5271|-> 	    *restp = alloc(unconvertlen);
# 5272|   	    if (*restp != NULL)
# 5273|   		mch_memmove(*restp, ptr + len - unconvertlen, unconvertlen);

Error: COMPILER_WARNING: [#def179]
vim91/src/memfile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def180]
vim91/src/memline.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def181]
vim91/src/menu.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def182]
vim91/src/message.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def183]
vim91/src/message.c:158:10: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 's')
#  156|       // truncated message)
#  157|       if ((char_u *)s != keep_msg
#  158|-> 	    || (*s != '<'
#  159|   		&& last_msg_hist != NULL
#  160|   		&& last_msg_hist->msg != NULL

Error: CLANG_WARNING: [#def184]
vim91/src/message.c:1984:7: warning[core.NullDereference]: Dereference of null pointer
# 1982|   		c = c_extra;
# 1983|   	    else
# 1984|-> 		c = *p_extra++;
# 1985|   	}
# 1986|   	else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)

Error: COMPILER_WARNING: [#def185]
vim91/src/misc1.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def186]
vim91/src/misc2.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def187]
vim91/src/misc2.c:2307:12: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 2305|   		}
# 2306|   	    }
# 2307|-> 	    modep = p;
# 2308|   	    if (*modep == ',')
# 2309|   		++modep;

Error: COMPILER_WARNING: [#def188]
vim91/src/mouse.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def189]
vim91/src/move.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def190]
vim91/src/move.c:2059:2: warning[deadcode.DeadStores]: Value stored to 'col' is never read
# 2057|   	// col may no longer be used, but make
# 2058|   	// sure it is correct anyhow, just in case
# 2059|-> 	col = col % width2;
# 2060|       }
# 2061|       if (row >= curwin->w_height)

Error: CPPCHECK_WARNING (CWE-476): [#def191]
vim91/src/move.c:3271: warning[nullPointer]: Possible null pointer dereference: curwin
# 3269|       static pos_T	prev_cursor = {0, 0, 0};
# 3270|   
# 3271|->     if (curwin == prev_curwin && EQUAL_POS(curwin->w_cursor, prev_cursor))
# 3272|   	return;
# 3273|       prev_curwin = curwin;

Error: CLANG_WARNING: [#def192]
vim91/src/move.c:3271:34: warning[core.NullDereference]: Dereference of null pointer
# 3269|       static pos_T	prev_cursor = {0, 0, 0};
# 3270|   
# 3271|->     if (curwin == prev_curwin && EQUAL_POS(curwin->w_cursor, prev_cursor))
# 3272|   	return;
# 3273|       prev_curwin = curwin;

Error: COMPILER_WARNING: [#def193]
vim91/src/netbeans.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def194]
vim91/src/netbeans.c: scope_hint: In function ‘nb_do_cmd’
vim91/src/netbeans.c:1214:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
vim91/src/netbeans.c:1001:13: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1012:18: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1021:18: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1036:18: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1059:18: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1076:18: note: in expansion of macro ‘streq’
vim91/src/netbeans.c:1130:18: note: in expansion of macro ‘streq’
# 1212|   			    // line.  Join the line with the next one, have
# 1213|   			    // the next line deleted below.
# 1214|-> 			    nb_joinlines(first.lnum, next->lnum);
# 1215|   			    del_to_lnum = next->lnum;
# 1216|   			}

Error: COMPILER_WARNING: [#def195]
vim91/src/normal.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def196]
vim91/src/ops.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def197]
vim91/src/ops.c:1354:7: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1352|   		while (pos.lnum < oap->end.lnum)
# 1353|   		{
# 1354|-> 		    ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
# 1355|   		    count = ml_get_buf_len(curbuf, pos.lnum) - pos.col;
# 1356|   		    netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def198]
vim91/src/ops.c: scope_hint: In function ‘op_change’
vim91/src/ops.c:1804:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bd.textcol’
# 1802|   	// the indent, exclude that indent change from the inserted text.
# 1803|   	firstline = ml_get(oap->start.lnum);
# 1804|-> 	if (bd.textcol > (colnr_T)pre_indent)
# 1805|   	{
# 1806|   	    long new_indent = (long)getwhitecols(firstline);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def199]
vim91/src/ops.c: scope_hint: In function ‘do_join’
vim91/src/ops.c:2051:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘prev_was_comment’
# 2049|   	    // We don't want to remove the comment leader if the
# 2050|   	    // previous line is not a comment.
# 2051|-> 	    if (t > 0 && prev_was_comment)
# 2052|   	    {
# 2053|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def200]
vim91/src/ops.c: scope_hint: In function ‘block_prep’
vim91/src/ops.c:2304:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*oap.start_vcol’
vim91/src/vim.h:457: included_from: Included from here.
vim91/src/ops.c:15: included_from: Included from here.
vim91/src/ops.c:3196:17: note: in expansion of macro ‘LT_POS’
# 2302|       prev_pstart = line;
# 2303|       init_chartabsize_arg(&cts, curwin, lnum, bdp->start_vcol, line, line);
# 2304|->     while (cts.cts_vcol < oap->start_vcol && *cts.cts_ptr != NUL)
# 2305|       {
# 2306|   	// Count a tab for what it's worth (if list mode not on)

Error: CPPCHECK_WARNING (CWE-457): [#def201]
vim91/src/ops.c:3254: warning[uninitvar]: Uninitialized variable: max_pos.lnum
# 3252|   	    // Do extra processing for VIsual mode.
# 3253|   	    if (VIsual_active
# 3254|-> 		    && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
# 3255|   	    {
# 3256|   		char_u	    *s = NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def202]
vim91/src/ops.c:3254: warning[uninitvar]: Uninitialized variable: min_pos.lnum
# 3252|   	    // Do extra processing for VIsual mode.
# 3253|   	    if (VIsual_active
# 3254|-> 		    && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
# 3255|   	    {
# 3256|   		char_u	    *s = NULL;

Error: CLANG_WARNING: [#def203]
vim91/src/ops.c:3254:15: warning[core.UndefinedBinaryOperatorResult]: The right operand of '>=' is a garbage value
# 3252|   	    // Do extra processing for VIsual mode.
# 3253|   	    if (VIsual_active
# 3254|-> 		    && lnum >= min_pos.lnum && lnum <= max_pos.lnum)
# 3255|   	    {
# 3256|   		char_u	    *s = NULL;

Error: CLANG_WARNING: [#def204]
vim91/src/ops.c:3328:30: warning[core.UndefinedBinaryOperatorResult]: The left operand of '-' is a garbage value
# 3326|   								    &max_pos.col);
# 3327|   		    vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
# 3328|-> 			    (long)(oparg.end_vcol - oparg.start_vcol + 1));
# 3329|   		}
# 3330|   		else

Error: GCC_ANALYZER_WARNING (CWE-457): [#def205]
vim91/src/ops.c: scope_hint: In function ‘cursor_pos_info’
vim91/src/ops.c:3328:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘oparg.end_vcol’
vim91/src/ops.c:3196:17: note: in expansion of macro ‘LT_POS’
# 3326|   								    &max_pos.col);
# 3327|   		    vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
# 3328|-> 			    (long)(oparg.end_vcol - oparg.start_vcol + 1));
# 3329|   		}
# 3330|   		else

Error: COMPILER_WARNING: [#def206]
vim91/src/option.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def207]
vim91/src/option.c: scope_hint: In function ‘set_option_default’
vim91/src/option.c:732:73: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
vim91/src/vim.h:2436: included_from: Included from here.
vim91/src/option.c:39: included_from: Included from here.
vim91/src/option.c:3016:35: note: in expansion of macro ‘SOURCING_LNUM’
#  730|   	    // May also set global value for local option.
#  731|   	    if (both)
#  732|-> 		*(int *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =
#  733|   								*(int *)varp;
#  734|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def208]
vim91/src/option.c: scope_hint: In function ‘ExpandSettingSubtract’
vim91/src/option.c:7924:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
vim91/src/option.c: scope_hint: In function ‘ExpandSettingSubtract’
vim91/src/option.c: scope_hint: In function ‘ExpandSettingSubtract’
# 7922|   	return ExpandOldSetting(numMatches, matches);
# 7923|   
# 7924|->     char_u *option_val = *(char_u**)get_option_varp_scope(
# 7925|   	expand_option_idx, expand_option_flags);
# 7926|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def209]
vim91/src/option.c: scope_hint: In function ‘option_value2string’
vim91/src/option.c:8076:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 8074|   	    STRCPY(NameBuff, transchar((int)wc));
# 8075|   	else
# 8076|-> 	    sprintf((char *)NameBuff, "%ld", *(long *)varp);
# 8077|       }
# 8078|       else    // P_STRING

Error: GCC_ANALYZER_WARNING (CWE-476): [#def210]
vim91/src/option.c:8076:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘args.oe_varp’
# 8074|   	    STRCPY(NameBuff, transchar((int)wc));
# 8075|   	else
# 8076|-> 	    sprintf((char *)NameBuff, "%ld", *(long *)varp);
# 8077|       }
# 8078|       else    // P_STRING

Error: GCC_ANALYZER_WARNING (CWE-476): [#def211]
vim91/src/option.c:8080:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 8078|       else    // P_STRING
# 8079|       {
# 8080|-> 	varp = *(char_u **)(varp);
# 8081|   	if (varp == NULL)		    // just in case
# 8082|   	    NameBuff[0] = NUL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def212]
vim91/src/option.c:8080:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘args.oe_varp’
# 8078|       else    // P_STRING
# 8079|       {
# 8080|-> 	varp = *(char_u **)(varp);
# 8081|   	if (varp == NULL)		    // just in case
# 8082|   	    NameBuff[0] = NUL;

Error: COMPILER_WARNING: [#def213]
vim91/src/optionstr.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-562): [#def214]
vim91/src/optionstr.c:4558: error[returnDanglingLifetime]: Returning pointer to local variable 'args' that will be invalid when returning.
# 4556|   #endif
# 4557|   
# 4558|->     return errmsg;
# 4559|   }
# 4560|   

Error: COMPILER_WARNING: [#def215]
vim91/src/os_unix.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-457): [#def216]
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
vim91/src/os_unix.c:4938:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[0]’
vim91/src/os_unix.c:4920:13: note: in expansion of macro ‘UNBLOCK_SIGNALS’
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
# 4936|   # endif
# 4937|   		{
# 4938|-> 		    close(fd_toshell[0]);
# 4939|   		    close(fd_toshell[1]);
# 4940|   		    close(fd_fromshell[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def217]
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
vim91/src/os_unix.c:4987:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
# 4985|   		{
# 4986|   		    vim_ignored = dup(fd); // To replace stdin  (fd 0)
# 4987|-> 		    vim_ignored = dup(fd); // To replace stdout (fd 1)
# 4988|   		    vim_ignored = dup(fd); // To replace stderr (fd 2)
# 4989|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
vim91/src/os_unix.c:4988:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
# 4986|   		    vim_ignored = dup(fd); // To replace stdin  (fd 0)
# 4987|   		    vim_ignored = dup(fd); // To replace stdout (fd 1)
# 4988|-> 		    vim_ignored = dup(fd); // To replace stderr (fd 2)
# 4989|   
# 4990|   		    // Don't need this now that we've duplicated it

Error: GCC_ANALYZER_WARNING (CWE-775): [#def219]
vim91/src/os_unix.c:5046:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
# 5044|   		    vim_ignored = dup(pty_slave_fd);
# 5045|   		    close(1);
# 5046|-> 		    vim_ignored = dup(pty_slave_fd);
# 5047|   		    if (gui.in_use)
# 5048|   		    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def220]
vim91/src/os_unix.c:5050:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
# 5048|   		    {
# 5049|   			close(2);
# 5050|-> 			vim_ignored = dup(pty_slave_fd);
# 5051|   		    }
# 5052|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def221]
vim91/src/os_unix.c:5059:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[1]’
# 5057|   		{
# 5058|   		    // set up stdin for the child
# 5059|-> 		    close(fd_toshell[1]);
# 5060|   		    close(0);
# 5061|   		    vim_ignored = dup(fd_toshell[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def222]
vim91/src/os_unix.c:5067:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
# 5065|   		    close(fd_fromshell[0]);
# 5066|   		    close(1);
# 5067|-> 		    vim_ignored = dup(fd_fromshell[1]);
# 5068|   		    close(fd_fromshell[1]);
# 5069|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def223]
vim91/src/os_unix.c:5075:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
# 5073|   			// set up stderr for the child
# 5074|   			close(2);
# 5075|-> 			vim_ignored = dup(1);
# 5076|   		    }
# 5077|   # endif

Error: GCC_ANALYZER_WARNING (CWE-910): [#def224]
vim91/src/os_unix.c:5075:39: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘1’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
# 5073|   			// set up stderr for the child
# 5074|   			close(2);
# 5075|-> 			vim_ignored = dup(1);
# 5076|   		    }
# 5077|   # endif

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
vim91/src/os_unix.c:5659:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_fromshell[0]’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
vim91/src/os_unix.c:4920:13: note: in expansion of macro ‘UNBLOCK_SIGNALS’
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
# 5657|       vim_free(tofree2);
# 5658|   
# 5659|->     return retval;
# 5660|   }
# 5661|   #endif // USE_SYSTEM

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
vim91/src/os_unix.c:5659:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_fromshell[1]’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
vim91/src/os_unix.c:4920:13: note: in expansion of macro ‘UNBLOCK_SIGNALS’
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
# 5657|       vim_free(tofree2);
# 5658|   
# 5659|->     return retval;
# 5660|   }
# 5661|   #endif // USE_SYSTEM

Error: GCC_ANALYZER_WARNING (CWE-775): [#def227]
vim91/src/os_unix.c:5659:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_toshell[0]’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
vim91/src/os_unix.c:4920:13: note: in expansion of macro ‘UNBLOCK_SIGNALS’
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
# 5657|       vim_free(tofree2);
# 5658|   
# 5659|->     return retval;
# 5660|   }
# 5661|   #endif // USE_SYSTEM

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
vim91/src/os_unix.c:5659:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_toshell[1]’
vim91/src/os_unix.c:4916:9: note: in expansion of macro ‘BLOCK_SIGNALS’
vim91/src/os_unix.c:4920:13: note: in expansion of macro ‘UNBLOCK_SIGNALS’
vim91/src/os_unix.c: scope_hint: In function ‘mch_call_shell_fork’
# 5657|       vim_free(tofree2);
# 5658|   
# 5659|->     return retval;
# 5660|   }
# 5661|   #endif // USE_SYSTEM

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
vim91/src/os_unix.c: scope_hint: In function ‘mch_job_start’
vim91/src/os_unix.c:6024:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[0]’
# 6022|       if (pty_slave_fd >= 0)
# 6023|   	close(pty_slave_fd);
# 6024|-> }
# 6025|   
# 6026|       static char_u *

Error: GCC_ANALYZER_WARNING (CWE-775): [#def230]
vim91/src/os_unix.c:6024:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[1]’
# 6022|       if (pty_slave_fd >= 0)
# 6023|   	close(pty_slave_fd);
# 6024|-> }
# 6025|   
# 6026|       static char_u *

Error: COMPILER_WARNING: [#def231]
vim91/src/popupmenu.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def232]
vim91/src/popupwin.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def233]
vim91/src/profiler.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def234]
vim91/src/pty.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def235]
vim91/src/quickfix.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def236]
vim91/src/regexp.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def237]
vim91/src/register.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def238]
vim91/src/register.c:1257:19: warning[core.NullDereference]: Array access (via field 'y_array') results in a null pointer dereference
# 1255|   	    goto fail;
# 1256|   	for (j = 0; j < curr->y_size; ++j)
# 1257|-> 	    new_ptr[j] = curr->y_array[j];
# 1258|   	vim_free(curr->y_array);
# 1259|   	curr->y_array = new_ptr;

Error: CLANG_WARNING: [#def239]
vim91/src/register.c:2001:7: warning[deadcode.DeadStores]: Value stored to 'lnum' is never read
# 1999|   	    {
# 2000|   		if (VIsual_active)
# 2001|-> 		    lnum = end_lnum;
# 2002|   	    }
# 2003|   	    else if (count > INT_MAX / yanklen)

Error: CLANG_WARNING: [#def240]
vim91/src/register.c:2017:8: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
# 2015|   
# 2016|   			pos.lnum = lnum;
# 2017|-> 			if (getvpos(&pos, vcol) == OK)
# 2018|   			    col = pos.col;
# 2019|   			else

Error: COMPILER_WARNING: [#def241]
vim91/src/screen.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def242]
vim91/src/scriptfile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def243]
vim91/src/scriptfile.c: scope_hint: In function ‘do_source_buffer_init’
vim91/src/scriptfile.c:1404:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eap’
# 1402|   
# 1403|       // Copy the lines from the buffer into a grow array
# 1404|->     for (curr_lnum = eap->line1; curr_lnum <= eap->line2; curr_lnum++)
# 1405|       {
# 1406|   	line = vim_strsave(ml_get(curr_lnum));

Error: CLANG_WARNING: [#def244]
vim91/src/scriptfile.c:1605:25: warning[core.NullDereference]: Access to field 'line1' results in a dereference of a null pointer (loaded from variable 'eap')
# 1603|   	// When sourcing a range of lines from a buffer, use the buffer line
# 1604|   	// number.
# 1605|-> 	cookie.sourcing_lnum = eap->line1 - 1;
# 1606|       else
# 1607|   	cookie.sourcing_lnum = 0;

Error: CLANG_WARNING: [#def245]
vim91/src/scriptfile.c:2719:5: warning[unix.cstring.NullArg]: Null pointer passed as 1st argument to string copy function
# 2717|   								    q = p, ++p)
# 2718|   	*p = '/';
# 2719|->     STRCPY(q, ".vim");
# 2720|       return scriptname;
# 2721|   }

Error: COMPILER_WARNING: [#def246]
vim91/src/search.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def247]
vim91/src/session.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def248]
vim91/src/session.c:862:6: warning[core.NullDereference]: Access to field 'w_next' results in a dereference of a null pointer (loaded from variable 'tab_firstwin')
#  860|   	}
#  861|   
#  862|-> 	if (tab_firstwin->w_next != NULL)
#  863|   	{
#  864|   	    // Go to the first window.

Error: COMPILER_WARNING: [#def249]
vim91/src/sha256.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def250]
vim91/src/sign.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def251]
vim91/src/sound.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def252]
vim91/src/spell.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def253]
vim91/src/spellfile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def254]
vim91/src/spellsuggest.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def255]
vim91/src/spellsuggest.c:4101:6: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 4099|   	    if (has_mbyte)
# 4100|   	    {
# 4101|-> 		bc = wbadword[i - 1];
# 4102|   		gc = wgoodword[j - 1];
# 4103|   	    }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def256]
vim91/src/spellsuggest.c: scope_hint: In function ‘spell_edit_score’
vim91/src/spellsuggest.c:4101:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘wbadword[<unknown>]’
vim91/src/vim.h:457: included_from: Included from here.
vim91/src/spellsuggest.c:14: included_from: Included from here.
vim91/src/spellsuggest.c:3362:22: note: in expansion of macro ‘PTR2CHAR’
vim91/src/spellsuggest.c:4080:23: note: in expansion of macro ‘STRLEN’
vim91/src/spellsuggest.c:4096:21: note: in expansion of macro ‘CNT’
# 4099|   	    if (has_mbyte)
# 4100|   	    {
# 4101|-> 		bc = wbadword[i - 1];
# 4102|   		gc = wgoodword[j - 1];
# 4103|   	    }

Error: COMPILER_WARNING: [#def257]
vim91/src/strings.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-404): [#def258]
vim91/src/strings.c: scope_hint: In function ‘skip_to_arg’
vim91/src/strings.c:2858:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
vim91/src/strings.c:2639:25: note: in expansion of macro ‘CHECK_POS_ARG’
vim91/src/strings.c:15: included_from: Included from here.
vim91/src/strings.c:2422:25: note: in expansion of macro ‘ALLOC_CLEAR_MULT’
# 2856|   	if (ap_types == NULL || ap_types[*arg_cur] == NULL)
# 2857|   	{
# 2858|-> 	    siemsg(e_aptypes_is_null_nr_str, *arg_cur, fmt);
# 2859|   	    return;
# 2860|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def259]
vim91/src/strings.c:2919:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
vim91/src/strings.c:2639:25: note: in expansion of macro ‘CHECK_POS_ARG’
vim91/src/strings.c:2422:25: note: in expansion of macro ‘ALLOC_CLEAR_MULT’
# 2917|       // increment the current argument index.
# 2918|       ++*arg_cur;
# 2919|->     ++*arg_idx;
# 2920|   
# 2921|       return;

Error: GCC_ANALYZER_WARNING (CWE-825): [#def260]
vim91/src/strings.c: scope_hint: In function ‘vim_vsnprintf_typval’
vim91/src/strings.c:3077:19: warning[-Wanalyzer-use-of-pointer-in-stale-stack-frame]: dereferencing pointer ‘ap’ to within stale stack frame
vim91/src/strings.c:2639:25: note: in expansion of macro ‘CHECK_POS_ARG’
vim91/src/strings.c:2422:25: note: in expansion of macro ‘ALLOC_CLEAR_MULT’
# 3075|   		}
# 3076|   
# 3077|-> 		j =
# 3078|   # if defined(FEAT_EVAL)
# 3079|   		    tvs != NULL ? tv_nr(tvs, &arg_idx) :

Error: COMPILER_WARNING: [#def261]
vim91/src/syntax.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def262]
vim91/src/tag.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def263]
vim91/src/tag.c:3399:10: warning[core.NullDereference]: Dereference of null pointer (loaded from field 'tn_np')
# 3397|   
# 3398|   	    // Stop when used all parts of 'tags'.
# 3399|-> 	    if (*tnp->tn_np == NUL)
# 3400|   	    {
# 3401|   		vim_findfile_cleanup(tnp->tn_search_ctx);

Error: CLANG_WARNING: [#def264]
vim91/src/tag.c:4280:29: warning[core.UndefinedBinaryOperatorResult]: The left operand of '-' is a garbage value
# 4278|   
# 4279|   	     parse_match((*file)[i], &t_p);
# 4280|-> 	     len = t_p.tagname_end - t_p.tagname;
# 4281|   	     if (len > name_buf_size - 3)
# 4282|   	     {

Error: CLANG_WARNING: [#def265]
vim91/src/tag.c:4301:25: warning[core.UndefinedBinaryOperatorResult]: The left operand of '-' is a garbage value
# 4299|   	     name_buf[len++] = 0;
# 4300|   	     mch_memmove((*file)[i] + len, t_p.fname,
# 4301|-> 						    t_p.fname_end - t_p.fname);
# 4302|   	     (*file)[i][len + (t_p.fname_end - t_p.fname)] = 0;
# 4303|   	     mch_memmove((*file)[i], name_buf, len);

Error: COMPILER_WARNING: [#def266]
vim91/src/term.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def267]
vim91/src/terminal.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def268]
vim91/src/testing.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def269]
vim91/src/testing.c:987:13: warning[deadcode.DeadStores]: Value stored to 'name' during its initialization is never read
#  985|   f_test_option_not_set(typval_T *argvars, typval_T *rettv UNUSED)
#  986|   {
#  987|->     char_u *name = (char_u *)"";
#  988|   
#  989|       if (check_for_string_arg(argvars, 0) == FAIL)

Error: CLANG_WARNING: [#def270]
vim91/src/testing.c:1003:13: warning[deadcode.DeadStores]: Value stored to 'name' during its initialization is never read
# 1001|   f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
# 1002|   {
# 1003|->     char_u *name = (char_u *)"";
# 1004|       int     val;
# 1005|       static int save_starting = -1;

Error: COMPILER_WARNING: [#def271]
vim91/src/textformat.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-476): [#def272]
vim91/src/textformat.c: scope_hint: In function ‘fmt_check_par’
vim91/src/textformat.c:519:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘flags’
vim91/src/textformat.c: scope_hint: In function ‘fmt_check_par’
#  517|   
#  518|       return (*skipwhite(ptr + *leader_len) == NUL
#  519|-> 	    || (*leader_len > 0 && *flags == COM_END)
#  520|   	    || startPS(lnum, NUL, FALSE));
#  521|   }

Error: CLANG_WARNING: [#def273]
vim91/src/textformat.c:645:10: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  643|   	return TRUE;		// numbered item starts in "lnum".
#  644|   
#  645|->     if (!same_leader(lnum - 1, leader_len, leader_flags,
#  646|   					  next_leader_len, next_leader_flags))
#  647|   	return TRUE;		// change of comment leader.

Error: COMPILER_WARNING: [#def274]
vim91/src/textobject.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def275]
vim91/src/textobject.c:1191:11: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 1189|   	if (sol)
# 1190|   	    incl(&curwin->w_cursor);
# 1191|-> 	else if (LTOREQ_POS(start_pos, curwin->w_cursor))
# 1192|   	    // Include the character under the cursor.
# 1193|   	    oap->inclusive = TRUE;

Error: COMPILER_WARNING: [#def276]
vim91/src/textprop.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def277]
vim91/src/time.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def278]
vim91/src/typval.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def279]
vim91/src/ui.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def280]
vim91/src/ui.c: scope_hint: In function ‘fill_input_buf’
vim91/src/ui.c:993:13: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘0’
#  991|   #ifdef HAVE_DUP
#  992|   	    // Use stderr for stdin, also works for shell commands.
#  993|-> 	    close(0);
#  994|   	    vim_ignored = dup(2);
#  995|   #else

Error: COMPILER_WARNING: [#def281]
vim91/src/undo.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def282]
vim91/src/usercmd.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def283]
vim91/src/userfunc.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def284]
vim91/src/version.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: GCC_ANALYZER_WARNING (CWE-688): [#def285]
vim91/src/change.c:14: included_from: Included from here.
vim91/src/change.c: scope_hint: In function ‘open_line’
vim91/src/vim.h:1713:29: warning[-Wanalyzer-null-argument]: use of NULL ‘leader’ where non-null expected
vim91/src/change.c:2126:63: note: in expansion of macro ‘STRLEN’
vim91/src/change.c:2126:63: note: in expansion of macro ‘STRLEN’
vim91/src/change.c:2126:63: note: in expansion of macro ‘STRLEN’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1711|    * (vim_strchr() and vim_strrchr() are now in strings.c)
# 1712|    */
# 1713|-> #define STRLEN(s)	    strlen((char *)(s))
# 1714|   #define STRCPY(d, s)	    strcpy((char *)(d), (char *)(s))
# 1715|   #define STRNCPY(d, s, n)    strncpy((char *)(d), (char *)(s), (size_t)(n))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def286]
vim91/src/channel.c:13: included_from: Included from here.
vim91/src/channel.c: scope_hint: In function ‘channel_process_lsp_http_hdr’
vim91/src/vim.h:1713:29: warning[-Wanalyzer-null-argument]: use of NULL ‘reader.js_buf’ where non-null expected
vim91/src/channel.c:2112:24: note: in expansion of macro ‘STRLEN’
vim91/src/vim.h:1713:45: note: in definition of macro ‘STRLEN’
vim91/src/channel.c:2112:24: note: in expansion of macro ‘STRLEN’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1711|    * (vim_strchr() and vim_strrchr() are now in strings.c)
# 1712|    */
# 1713|-> #define STRLEN(s)	    strlen((char *)(s))
# 1714|   #define STRCPY(d, s)	    strcpy((char *)(d), (char *)(s))
# 1715|   #define STRNCPY(d, s, n)    strncpy((char *)(d), (char *)(s), (size_t)(n))

Error: COMPILER_WARNING: [#def287]
vim91/src/vim9class.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def288]
vim91/src/vim9class.c:287:12: warning[core.NullDereference]: Access to field 'class_name' results in a dereference of a null pointer (loaded from variable 'cl')
#  285|       {
#  286|   	siemsg("class %s not found on interface %s",
#  287|-> 					      cl->class_name, itf->class_name);
#  288|   	return 0;
#  289|       }

Error: COMPILER_WARNING: [#def289]
vim91/src/vim9cmds.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def290]
vim91/src/vim9cmds.c:2338:36: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 2336|       }
# 2337|   
# 2338|->     if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL)
# 2339|       {
# 2340|   	int	count = 0;

Error: COMPILER_WARNING: [#def291]
vim91/src/vim9compile.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def292]
vim91/src/vim9compile.c:1431:11: warning[deadcode.DeadStores]: Value stored to 'scope' during its initialization is never read
# 1429|   vim9_declare_error(char_u *name)
# 1430|   {
# 1431|->     char *scope = "";
# 1432|   
# 1433|       switch (*name)

Error: COMPILER_WARNING: [#def293]
vim91/src/vim9execute.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CLANG_WARNING: [#def294]
vim91/src/vim9execute.c:2967:12: warning[deadcode.DeadStores]: Value stored to 'stack' during its initialization is never read
# 2965|       garray_T	    *gap = &loopvars->lvs_ga;
# 2966|       int		    done = 0;
# 2967|-> 	typval_T	*stack = gap->ga_data;
# 2968|   
# 2969|       if (loopvars->lvs_refcount > loopvars->lvs_min_refcount)

Error: CPPCHECK_WARNING (CWE-562): [#def295]
vim91/src/vim9execute.c:6306: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6304|       // Store the execution context in funccal, used by invoke_all_defer().
# 6305|       if (funccal != NULL)
# 6306|-> 	funccal->fc_ectx = &ectx;
# 6307|   
# 6308|       // Following errors are in the function, not the caller.

Error: COMPILER_WARNING: [#def296]
vim91/src/vim9expr.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def297]
vim91/src/vim9instr.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-476): [#def298]
vim91/src/vim9instr.c:441: warning[nullPointer]: Possible null pointer dereference: type1
#  439|   {
#  440|       isntype_T	isntype = ISN_DROP;
#  441|->     vartype_T	vartype1 = tv1 != NULL ? tv1->v_type : type1->tt_type;
#  442|       vartype_T	vartype2 = tv2 != NULL ? tv2->v_type : type2->tt_type;
#  443|   

Error: CLANG_WARNING: [#def299]
vim91/src/vim9instr.c:441:54: warning[core.NullDereference]: Access to field 'tt_type' results in a dereference of a null pointer (loaded from variable 'type1')
#  439|   {
#  440|       isntype_T	isntype = ISN_DROP;
#  441|->     vartype_T	vartype1 = tv1 != NULL ? tv1->v_type : type1->tt_type;
#  442|       vartype_T	vartype2 = tv2 != NULL ? tv2->v_type : type2->tt_type;
#  443|   

Error: CPPCHECK_WARNING (CWE-476): [#def300]
vim91/src/vim9instr.c:442: warning[nullPointer]: Possible null pointer dereference: type2
#  440|       isntype_T	isntype = ISN_DROP;
#  441|       vartype_T	vartype1 = tv1 != NULL ? tv1->v_type : type1->tt_type;
#  442|->     vartype_T	vartype2 = tv2 != NULL ? tv2->v_type : type2->tt_type;
#  443|   
#  444|       if (vartype1 == VAR_CLASS || vartype1 == VAR_TYPEALIAS)

Error: CLANG_WARNING: [#def301]
vim91/src/vim9instr.c:442:54: warning[core.NullDereference]: Access to field 'tt_type' results in a dereference of a null pointer (loaded from variable 'type2')
#  440|       isntype_T	isntype = ISN_DROP;
#  441|       vartype_T	vartype1 = tv1 != NULL ? tv1->v_type : type1->tt_type;
#  442|->     vartype_T	vartype2 = tv2 != NULL ? tv2->v_type : type2->tt_type;
#  443|   
#  444|       if (vartype1 == VAR_CLASS || vartype1 == VAR_TYPEALIAS)

Error: COMPILER_WARNING: [#def302]
vim91/src/vim9script.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def303]
vim91/src/vim9type.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def304]
vim91/src/viminfo.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: CPPCHECK_WARNING (CWE-457): [#def305]
vim91/src/viminfo.c:648: warning[uninitvar]: Uninitialized variable: p
#  646|       else
#  647|   	len = 0; // for picky compilers
#  648|->     if (p != NULL)
#  649|       {
#  650|   	viminfo_history[type][idx].time_set = vp[1].bv_nr;

Error: CLANG_WARNING: [#def306]
vim91/src/viminfo.c:1311:11: warning[deadcode.DeadStores]: Value stored to 's' during its initialization is never read
# 1309|       dictitem_T	*this_var;
# 1310|       int		todo;
# 1311|->     char	*s = "";
# 1312|       char_u	*p;
# 1313|       char_u	*tofree;

Error: CLANG_WARNING: [#def307]
vim91/src/viminfo.c:1684:15: warning[core.NullDereference]: Array access (via field 'y_array') results in a null pointer dereference
# 1682|   	// free y_array[]
# 1683|   	for (i = 0; i < y_current_p->y_size; i++)
# 1684|-> 	    vim_free(y_current_p->y_array[i]);
# 1685|   	vim_free(y_current_p->y_array);
# 1686|   

Error: CLANG_WARNING: [#def308]
vim91/src/viminfo.c:1805:24: warning[core.NullDereference]: Array access (via field 'y_array') results in a null pointer dereference
# 1803|   	if (vp[i + 6].bv_allocated)
# 1804|   	{
# 1805|-> 	    y_ptr->y_array[i] = vp[i + 6].bv_string;
# 1806|   	    vp[i + 6].bv_string = NULL;
# 1807|   	}

Error: CLANG_WARNING: [#def309]
vim91/src/viminfo.c:1814:24: warning[core.NullDereference]: Array access (via field 'y_array') results in a null pointer dereference
# 1812|   	}
# 1813|   	else
# 1814|-> 	    y_ptr->y_array[i] = vim_strsave(vp[i + 6].bv_string);
# 1815|       }
# 1816|   }

Error: COMPILER_WARNING: [#def310]
vim91/src/window.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def311]
vim91/src/xdiff/xdiffi.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def312]
vim91/src/xdiff/xemit.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def313]
vim91/src/xdiff/xhistogram.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def314]
vim91/src/xdiff/xpatience.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def315]
vim91/src/xdiff/xprepare.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def316]
vim91/src/xdiff/xutils.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Error: COMPILER_WARNING: [#def317]
vim91/src/xxd/xxd.c: warning: -D_FORTIFY_SOURCE defined but value is too low

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-247.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namevim-9.1.309-1.fc41
store-results-to/tmp/tmplhxhiugx/vim-9.1.309-1.fc41.tar.xz
time-created2024-04-22 11:37:28
time-finished2024-04-22 11:55:56
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmplhxhiugx/vim-9.1.309-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmplhxhiugx/vim-9.1.309-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9