On 28-Apr-2020 06:48, Bram Moolenaar wrote:
Patch 8.2.0650
Problem: Vim9: script function can be deleted.
Solution: Disallow deleting script function. Delete functions when sourcing
a script again.
Files: src/userfunc.c, src/proto/userfunc.pro, src/evalfunc.c,
src/vim9compile.c, src/vim9execute.c, src/vim9script.c,
src/scriptfile.c, src/testing.c, src/testdir/test_vim9_expr.vim,
src/testdir/test_vim9_func.vim, src/testdir/test_vim9_script.vim
After this patch, mingw64 (gcc 9.3.1) spits out this warning:
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 userfunc.c -o gobjnative/userfunc.o
In file included from userfunc.c:14:
userfunc.c: In function 'delete_script_functions':
vim.h:1594:45: warning: 'fp' may be used uninitialized in this function
[-Wmaybe-uninitialized]
1594 | #define STRNCMP(d, s, n) strncmp((char *)(d), (char *)(s),
(size_t)(n))
| ^
userfunc.c:1587:14: note: 'fp' was declared here
1587 | ufunc_T *fp;
| ^~
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/395458ca-b9e3-79e8-bc88-620be6bc39fe%40internode.on.net.