John Marriott wrote:

> On 19-Feb-2023 01:43, Bram Moolenaar wrote:
> > Patch 9.0.1320
> > Problem:    Checking the type of a null object causes a crash.
> > Solution:   Don't try to get the class of a null object. (closes #12005)
> >              Handle error from calling a user function better.
> > Files:      src/vim9type.c, src/vim.h, src/userfunc.c, 
> > src/proto/userfunc.pro,
> >              src/evalfunc.c, src/proto/evalfunc.pro, src/vim9execute.c,
> >              src/if_lua.c, src/testdir/test_vim9_class.vim
> >
> >
> After this patch, msys64 (clang 15.0.7) gives this warning on gui and 
> non-gui builds:
> <snip>
> clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
> -pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
> -DFEAT_CLIPBOARD vim9expr.c -o gobjx86-64/vim9expr.o
> vim9expr.c:993:57: warning: incompatible pointer types passing 'int *' 
> to parameter of type 'funcerror_T *' [-Wincompatible-pointer-types]
>      name = fname_trans_sid(namebuf, fname_buf, &tofree, &error);
>                                                          ^~~~~~
> proto/userfunc.pro:12:88: note: passing argument to parameter 'error' here
> char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u 
> **tofree, funcerror_T *error);
> ^
> 1 warning generated.
> </snip>
> 
> The attached patch tries to fix it.

Thanks.  I had actually changed this, but forgot to include it in the
patch.  9.0.1323 already corrects it.

-- 
hundred-and-one symptoms of being an internet addict:
146. You experience ACTUAL physical withdrawal symptoms when away
     from your 'puter and the net.

 /// 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/20230218201624.806FD1C07A0%40moolenaar.net.

Raspunde prin e-mail lui