On 11-Sept-2021 00:59, Bram Moolenaar wrote:
Patch 8.2.3424
Problem:    A sequence of spaces is hard to see in list mode.
Solution:   Add the "multispace" option to 'listchars'. (closes #8834)
Files:      runtime/doc/options.txt, src/drawline.c, src/message.c,
             src/screen.c, src/structs.h, src/testdir/test_listchars.vim


After this patch, mingw64 (gcc 11.2) throws this warning:
<snip>
gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD screen.c -o gobjnative/screen.o
screen.c: In function 'set_chars_option':
screen.c:4957:32: warning: 'last_multispace' may be used uninitialized in this function [-Wmaybe-uninitialized]
 4957 |                             if (p == last_multispace)
      |                                ^
</snip>

The attached patch tries to fix it.

Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/18e9fa7d-a2be-a0a1-fac0-f87e37168868%40internode.on.net.
--- screen.c.orig       2021-09-11 04:47:47.826424500 +1000
+++ screen.c    2021-09-11 05:00:25.932565700 +1000
@@ -4787,7 +4787,7 @@
     int                round, i, len, entries;
     char_u     *p, *s;
     int                c1 = 0, c2 = 0, c3 = 0;
-    char_u     *last_multispace;       // Last occurrence of "multispace:"
+    char_u     *last_multispace = NULL;        // Last occurrence of 
"multispace:"
     int                multispace_len = 0;     // Length of lcs-multispace 
string
     struct charstab
     {

Raspunde prin e-mail lui