John Marriott wrote:

> On 23-May-2022 04:14, Bram Moolenaar wrote:
> > Patch 8.2.5003
> > Problem:    Cannot do bitwise shifts.
> > Solution:   Add the >> and << operators. (Yegappan Lakshmanan, closes #84=
> 57)
> > Files:      runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.h=
> ,
> >              src/vim.h, src/vim9execute.c, src/vim9expr.c,
> >              src/testdir/test_expr.vim, src/testdir/test_vim9_disassemble=
> .vim,
> >              src/testdir/test_vim9_expr.vim
> >
> >
> After this patch, mingw64 (gcc 11.3.0) throws this compile 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 vim9expr.c -o 
> gobjnative/vim9expr.o
> vim9expr.c: In function 'compile_expr5':
> vim9expr.c:2718:36: warning: 'tv1' may be used uninitialized in this 
> function [-Wmaybe-uninitialized]
>   2718 |                 tv1->vval.v_number = 0;
>        |                 ~~~~~~~~~~~~~~~~~~~^~~
> </snip>
> 
> Sorry I don't have a patch for this. I'm not sure what the purpose of 
> tv1 is. It gets set (lines 2718 to 2722) but I don't see where it is used.

I can shut up the compiler by initializing tv1 to NULL.  Which is weird,
since using NULL would cause a crash.  Oh, we can set tv1 later, that
looks better.

-- 
hundred-and-one symptoms of being an internet addict:
269. You receive an e-mail from the wife of a deceased president, offering
     to send you twenty million dollar, and you are not even surprised.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/20220522205030.175E31C06D7%40moolenaar.net.

Raspunde prin e-mail lui