John Marriott wrote:

> On 10-Jan-2022 08:37, Bram Moolenaar wrote:
> > Patch 8.2.4050
> > Problem:    Vim9: need to prefix every item in an autoload script.
> > Solution:   First step in supporting "vim9script autoload" and "import
> >              autoload".
> > Files:      runtime/doc/repeat.txt, runtime/doc/vim9.txt, src/structs.h,
> >              src/errors.h, src/vim9script.c, src/scriptfile.c,
> >              src/proto/scriptfile.pro, src/userfunc.c, src/eval.c,
> >              src/evalvars.c, src/vim9compile.c, src/proto/vim9compile.pro=
> ,
> >              src/vim9expr.c, src/testdir/test_vim9_script.vim
> >
> >
> >
> After this patch, mingw64 (gcc 11.2.0) comes up with 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 scriptfile.c -o 
> gobjnative/scriptfile.o
> scriptfile.c: In function 'get_new_scriptitem':
> scriptfile.c:309:23: warning: 'si' may be used uninitialized in this 
> function [-Wmaybe-uninitialized]
>    309 |     si->sn_script_seq = current_sctx.sc> _seq;
>        |     ~~~~~~~~~~~~~~~~~> ~^~~~~~~~~~~~~~~~~~~~~
> </snip>
> 
> The attached patch tries to fix it.

Yeah, "si" can't really be NULL but the compiler doesn't know that.
Thanks for the patch.

Still more work to do on this autoload mechanism...

-- 
This sentence is not sure that it exists, but if it does, it will
certainly consider the possibility that other sentences exist.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220110121734.31C321C053F%40moolenaar.net.

Raspunde prin e-mail lui