From ede1ff69515d86e76f5147b21acad7c8d8a40b27 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Thu, 28 Sep 2023 12:31:48 +0200 Subject: [PATCH] demos: Do not trigger -Wmissing-prototypes for wmain(). For some reason wmain() is not exempted from -Wmissing-prototypes in the same way as main() is. So we just declare a prototype for it. --- demos/gears.c | 3 +++ demos/triangle.c | 3 +++ gitlab/build-mingw | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/demos/gears.c b/demos/gears.c index ab90e0d4..5809648e 100644 --- a/demos/gears.c +++ b/demos/gears.c @@ -888,6 +888,9 @@ static int cxg_main(void) } #ifdef _WIN32 +/* Do not trigger -Wmissing-prototypes. */ +int wmain(void); + int wmain(void) #else int main(void) diff --git a/demos/triangle.c b/demos/triangle.c index b331da0c..79257ed8 100644 --- a/demos/triangle.c +++ b/demos/triangle.c @@ -401,6 +401,9 @@ static int cxt_main(void) } #ifdef _WIN32 +/* Do not trigger -Wmissing-prototypes. */ +int wmain(void); + int wmain(void) #else int main(void) diff --git a/gitlab/build-mingw b/gitlab/build-mingw index c9d3b9f7..383f9c4b 100755 --- a/gitlab/build-mingw +++ b/gitlab/build-mingw @@ -13,7 +13,7 @@ mkdir build cd build mkdir vulkan-headers cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-headers -../configure --enable-demos --disable-doxygen-doc --without-ncurses --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" CFLAGS="-g -O2 -Wno-format -Wno-array-bounds -Wno-missing-prototypes -Wno-incompatible-pointer-types -Werror" LDFLAGS="-static-libgcc" && \ +../configure --enable-demos --disable-doxygen-doc --without-ncurses --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" CFLAGS="-g -O2 -Wno-format -Wno-array-bounds -Wno-incompatible-pointer-types -Werror" LDFLAGS="-static-libgcc" && \ make -j$(nproc) && \ make -j$(nproc) install DESTDIR="$PWD/destdir" || \ touch ../pipeline_failed