John Marriott wrote:

> On 20-Apr-2020 00:29, Bram Moolenaar wrote:
> > Patch 8.2.0601
> > Problem:    Vim9: :unlet is not compiled.
> > Solution:   Implement :unlet instruction and check for errors.
> > Files:      src/vim9compile.c, src/proto/vim9compile.pro, src/vim9.h,
> >              src/vim9execute.c, src/evalvars.c, src/proto/evalvars.pro,
> >              src/eval.c, src/testdir/test_vim9_script.vim,
> >              src/testdir/test_vim9_disassemble.vim
> >
> After applying patches 8.2.0599 to 8.2.0606 (I think this is from 
> 8.2.0601), mingw64 (gcc 9.3.1) spits out these warnings:
> <snip>
> gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_MSWIN 
> -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return evalvars.c -o gobjnative/evalvars.o
> evalvars.c: In function 'ex_unletlock':
> evalvars.c:1461:15: warning: 'name_end' may be used uninitialized in 
> this function [-Wmaybe-uninitialized]
>   1461 |     } while (!ends_excmd2(name_end, arg));
>        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
> evalvars.c: In function 'ex_unlet':
> evalvars.c:1461:15: warning: 'name_end' may be used uninitialized in 
> this function [-Wmaybe-uninitialized]
>   1461 |     } while (!ends_excmd2(name_end, arg));
>        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
> evalvars.c:1412:13: note: 'name_end' was declared here
>   1412 |     char_u *name_end;
>        |             ^~~~~~~~
> evalvars.c: In function 'ex_lockvar':
> evalvars.c:1461:15: warning: 'name_end' may be used uninitialized in 
> this function [-Wmaybe-uninitialized]
>   1461 |     } while (!ends_excmd2(name_end, arg));
>        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
> evalvars.c:1412:13: note: 'name_end' was declared here
>   1412 |     char_u *name_end;
>        |             ^~~~~~~~
> </snip>
> 
> This patch makes gcc happy again.

Thanks.  But setting it to NULL is not correct.  I'll rearrange the code
to avoid the "continue", then it works better.

-- 
The fastest way to get an engineer to solve a problem is to declare that the
problem is unsolvable.  No engineer can walk away from an unsolvable problem
until it's solved.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202004192059.03JKxGLq004924%40masaka.moolenaar.net.

Raspunde prin e-mail lui