lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Important clang warning


From: Gisle Vanem
Subject: [lwip-devel] Important clang warning
Date: Thu, 24 May 2018 22:16:11 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

A pretty important warning from clang-cl:

src/contrib/ports/win32/sys_arch.c(457,28):  warning: cast between incompatible 
calling conventions
'cdecl' and 'stdcall'; calls through this pointer may abort at runtime 
[-Wcast-calling-convention]
    h = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)sys_thread_function, new_thread, 0, 
&(new_thread->id));
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/contrib/ports/win32/sys_arch.c(425,1):  note: consider defining 
'sys_thread_function'
with the 'stdcall' calling convention sys_thread_function(void* arg)

Mixing stdcall with cdecl can be dangerous; maybe not in this case though?

--
--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]