[Piglit] [PATCH] cmake: Enable __USE_MINGW_ANSI_STDIO for MinGW builds.
Vinson Lee
vlee at freedesktop.org
Mon Jul 20 21:23:33 PDT 2015
Fix printf compiler warnings.
getprogramresourceiv.c: In function 'check_prop':
getprogramresourceiv.c:747:20: warning: unknown conversion type character 'z' in format [-Wformat=]
fprintf(stderr, "'%s' expected %zu entries but got %i"
^
getprogramresourceiv.c:747:20: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long long unsigned int}' [-Wformat=]
getprogramresourceiv.c:747:20: warning: too many arguments for format [-Wformat-extra-args]
getprogramresourceiv.c:828:20: warning: unknown conversion type character 'z' in format [-Wformat=]
fprintf(stderr, "'%s' expected %zu entries but got %i"
^
getprogramresourceiv.c:828:20: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long long unsigned int}' [-Wformat=]
getprogramresourceiv.c:828:20: warning: too many arguments for format [-Wformat-extra-args]
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99d9a8e..95a6b31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,6 +280,8 @@ if (MINGW)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libstdc++")
endif ()
+
+ add_definitions(-D__USE_MINGW_ANSI_STDIO)
endif ()
if (${CMAKE_C_COMPILER_ID} STREQUAL "SunPro")
--
2.4.6
More information about the Piglit
mailing list