https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ff3bb904b5088125d7dc…
commit 0ff3bb904b5088125d7dcd79f04dd77b0bc55b57
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jul 20 17:34:24 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Nov 24 09:28:00 2019 +0100
[CMAKE] Turn printf format warnings (C4313 and C4477) into errors
---
sdk/cmake/msvc.cmake | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index 472275ae279..3b576cf867d 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -102,11 +102,13 @@ add_compile_flags("/wd4018")
# - C4229: modifiers on data are ignored
# - C4311: pointer truncation from '<pointer>' to
'<integer>'
# - C4312: conversion from '<integer>' to '<pointer>' of
greater size
+# - C4313: 'fprintf': '%x' in format string conflicts with argument n of
type 'HANDLE'
+# - C4477: '_snprintf' : format string '%ld' requires an argument of type
'long', but variadic argument 1 has type 'DWORD_PTR'
# - C4603: macro is not defined or definition is different after precompiled header use
# - C4700: uninitialized variable usage
# - C4715: 'function': not all control paths return a value
# - C4716: function must return a value
-add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129
/we4133 /we4163 /we4229 /we4311 /we4312 /we4603 /we4700 /we4715 /we4716")
+add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129
/we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715
/we4716")
# - C4189: local variable initialized but not referenced
# Not in Release mode and not with MSVC 2010