-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
What is up with the state of the Windows code in the demos?
E.g. compiling http_server_demo/src/main.c using clang-cl v17.0.1 (for x64), gives me this error:
demo/http_server_demo/src/main.c(80,42): error: conflicting types for 'WaitForSingleObject'
80 | __declspec(dllimport) uint32_t __stdcall WaitForSingleObject(
| ^
f:\gv\WinKit\Include\10.0.22621.0\um\synchapi.h(346,1): note: previous declaration is here
346 | WaitForSingleObject(
| ^
1 error generated.There should be no need to prototype this OS-function (since <windows.h> should have been included already).
But pre-processing this files gives:
// From <synchapi.h>
__declspec (dllimport) DWORD __stdcall WaitForSingleObject (HANDLE hHandle, DWORD dwMilliseconds);
// From http_server_demo/src/main.c:
__declspec (dllimport) uint32_t __stdcall WaitForSingleObject (void *hHandle, uint32_t dwMilliseconds);See, not really the same due to the typedefs according to clag-cl. But the same in practice.
With cl, there is only a warning:
demo/http_server_demo/src/main.c(81): warning C4028: formal parameter 2 different from declaration
demo/http_server_demo/src/main.c(81): warning C4142: 'WaitForSingleObject': benign redefinition of type
f:\gv\WinKit\Include\10.0.22621.0\um\synchapi.h(346): note: see declaration of 'WaitForSingleObject'There is this same issue with all demo/*/main.c files.
Metadata
Metadata
Assignees
Labels
No labels