Ken Takata wrote:

> 2016/8/3 Wed 6:02:45 UTC+9 John Marriott wrote:
> > On 03-Aug-2016 05:55, Bram Moolenaar wrote:
> > > Patch 7.4.2145
> > > Problem:    Win32: Using CreateThread/ExitThread is not safe.
> > > Solution:   Use _beginthreadex and return from the thread. (Ken Takata)
> > > Files:      src/os_win32.c
> > >
> > >
> > This patch generates a warning, like so (on mingw64):
> > gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> > -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
> >   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> > -freg-struct-return -s os_win32.c -o gobjnative/os_win32.o
> > os_win32.c: In function 'mch_system_piped':
> > os_win32.c:4497:4: warning: passing argument 3 of '_beginthreadex' from 
> > incompatible pointer type [-Wincompatible-pointe
> > r-types]
> >      sub_process_writer, /* function to be executed */
> >      ^~~~~~~~~~~~~~~~~~
> > In file included from os_win32.c:35:0:
> > C:/Programs/MinGW64/x86_64-w64-mingw32/include/process.h:33:29: note: 
> > expected 'unsigned int (*)(void *)' but argument i
> > s of type 'DWORD (*)(void *) {aka long unsigned int (*)(void *)}'
> >     _CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned 
> > _StackSize,unsigned (__stdcall *_StartAddress) (voi
> > d *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr);
> >                               ^~~~~~~~~~~~~~
> 
> Oh. Attached patch should fix the problem.

Thanks.

-- 
There are two ways of constructing a software design. One way is to make
it so simple that there are obviously no deficiencies. The other way
is to make it so complicated that there are no obvious deficiencies.
                                                           -C.A.R. Hoare

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui