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.

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/52e2dd28-0de6-add7-40e7-356d81ab8245%40internode.on.net.
--- evalvars.c.orig     2020-04-20 05:07:41.825242900 +1000
+++ evalvars.c  2020-04-20 06:05:31.519486800 +1000
@@ -1409,7 +1409,7 @@
     void       *cookie)
 {
     char_u     *arg = argstart;
-    char_u     *name_end;
+    char_u     *name_end = NULL;
     int                error = FALSE;
     lval_T     lv;
 

Raspunde prin e-mail lui