On 26-July-2022 03:14, Bram Moolenaar wrote:
Patch 9.0.0067
Problem:    Cannot show virtual text.
Solution:   Initial changes for virtual text support, using text properties.
Files:      runtime/doc/textprop.txt, src/beval.c, src/charset.c,
             src/drawline.c, src/edit.c, src/errors.h, src/evalfunc.c,
             src/getchar.c, src/indent.c, src/misc1.c, src/misc2.c,
             src/mouse.c, src/ops.c, src/popupwin.c, src/proto/charset.pro,
             src/proto/textprop.pro, src/regexp.c, src/regexp_bt.c,
             src/regexp_nfa.c, src/register.c, src/structs.h, src/textprop.c,
             src/testdir/test_textprop.vim,
             src/testdir/dumps/Test_prop_inserts_text.dump


After this patch, mingw64 (gcc 12.1.0) gives 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 drawline.c -o gobjnative/drawline.o drawline.c:858:16: warning: 'charsize' may be used uninitialized [-Wmaybe-uninitialized]   858 |             if (( (*mb_ptr2cells)(ptr) >= charsize || *ptr == TAB) && col == 0)
      |                ^
drawline.c:822:25: note: 'charsize' was declared here
  822 |         int             charsize;
      |                         ^~~~~~~~
</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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/93c98f39-974f-e785-f4b9-b073b9b75d52%40internode.on.net.
--- drawline.c.orig     2022-07-26 05:56:43.552462500 +1000
+++ drawline.c  2022-07-26 06:02:55.006725800 +1000
@@ -819,7 +819,7 @@
     {
        char_u          *prev_ptr = ptr;
        chartabsize_T   cts;
-       int             charsize;
+       int             charsize = 0;
 
        init_chartabsize_arg(&cts, wp, lnum, vcol, line, ptr);
        while (cts.cts_vcol < v && *cts.cts_ptr != NUL)

Raspunde prin e-mail lui