diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-10-16 09:42:03 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-10-16 09:42:03 +0200 |
commit | 54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5 (patch) | |
tree | 358653435a913392b8d8d028f0360c951b525307 /src/_pch.h | |
parent | 7d94b18dcc41ccdcb5c8e9cff658b7c2a84b283f (diff) | |
download | lanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.tar.gz lanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.tar.bz2 lanes-54acd7514dc0a2e9d593dd6312eae90ae6c0d6b5.zip |
Fix/suppress MSVC /Wall warnings
Diffstat (limited to 'src/_pch.h')
-rw-r--r-- | src/_pch.h | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -26,6 +26,14 @@ | |||
26 | #include <utility> | 26 | #include <utility> |
27 | #include <variant> | 27 | #include <variant> |
28 | 28 | ||
29 | #ifdef _MSC_VER | ||
30 | |||
31 | // warning level /Wall triggers a bunch of warnings in Lua headers. we can't do anything about that, so suppress them | ||
32 | #pragma warning(push) | ||
33 | #pragma warning(disable : 4820) // 'n' bytes padding added after data member 'x' | ||
34 | |||
35 | #endif // _MSC_VER | ||
36 | |||
29 | #ifdef __cplusplus | 37 | #ifdef __cplusplus |
30 | extern "C" | 38 | extern "C" |
31 | { | 39 | { |
@@ -36,3 +44,23 @@ extern "C" | |||
36 | #ifdef __cplusplus | 44 | #ifdef __cplusplus |
37 | } | 45 | } |
38 | #endif // __cplusplus | 46 | #endif // __cplusplus |
47 | |||
48 | #ifdef _MSC_VER | ||
49 | |||
50 | #pragma warning(pop) | ||
51 | |||
52 | #pragma warning(disable : 4061) // enumerator 'x' in switch of 'y' is not explicitly handled by a case label | ||
53 | #pragma warning(disable : 4514) // 'x': unreferenced inline function has been removed | ||
54 | #pragma warning(disable : 4623) // 'x': default constructor was implicitly defined as deleted | ||
55 | #pragma warning(disable : 4623) // 'x': default constructor was implicitly defined as deleted | ||
56 | #pragma warning(disable : 4625) // 'x': copy constructor was implicitly defined as deleted | ||
57 | #pragma warning(disable : 4626) // 'x': assignment operator was implicitly defined as deleted | ||
58 | #pragma warning(disable : 4820) // 'n' bytes padding added after data member 'x' | ||
59 | #pragma warning(disable : 5026) // 'x': move constructor was implicitly defined as deleted | ||
60 | #pragma warning(disable : 5027) // 'x': move assignment operator was implicitly defined as deleted | ||
61 | #pragma warning(disable : 5039) // 'x': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception. | ||
62 | #pragma warning(disable : 5045) // Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified | ||
63 | #pragma warning(disable : 5220) // 'x': a non-static data member with a volatile qualified type no longer implies that compiler generated copy/move constructors and copy/move assignment operators are not trivial | ||
64 | #pragma warning(disable : 5246) // 'x': the initialization of a subobject should be wrapped in braces | ||
65 | |||
66 | #endif // _MSC_VER | ||