Lagrange
warnoff.h
1/*
2 * Copyright 2020 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#if defined(__clang__)
13 #pragma clang diagnostic push
14 #pragma clang diagnostic ignored "-Wunknown-warning-option"
15 // Not all warnings are supported by older version of clang.
16 // So the line above has to come first.
17 #pragma clang diagnostic ignored "-Wdeprecated"
18 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
19 #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
20 #pragma clang diagnostic ignored "-Wdeprecated-register"
21 #pragma clang diagnostic ignored "-Wdocumentation"
22 #pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
23 #pragma clang diagnostic ignored "-Wexit-time-destructors"
24 #pragma clang diagnostic ignored "-Wextra-semi"
25 #pragma clang diagnostic ignored "-Wglobal-constructors"
26 #pragma clang diagnostic ignored "-Wignored-qualifiers"
27 #pragma clang diagnostic ignored "-Wmissing-noreturn"
28 #pragma clang diagnostic ignored "-Wnewline-eof"
29 #pragma clang diagnostic ignored "-Wold-style-cast"
30 #pragma clang diagnostic ignored "-Wrange-loop-analysis"
31 #pragma clang diagnostic ignored "-Wreorder"
32 #pragma clang diagnostic ignored "-Wreorder-ctor"
33 #pragma clang diagnostic ignored "-Wshadow"
34 #pragma clang diagnostic ignored "-Wsign-compare"
35 #pragma clang diagnostic ignored "-Wsign-conversion"
36 #pragma clang diagnostic ignored "-Wundef"
37 #pragma clang diagnostic ignored "-Wunused-but-set-variable"
38 #pragma clang diagnostic ignored "-Wunused-lambda-capture"
39 #pragma clang diagnostic ignored "-Wunused-local-typedef"
40 #pragma clang diagnostic ignored "-Wunused-parameter"
41 #pragma clang diagnostic ignored "-Wunused-value"
42 #pragma clang diagnostic ignored "-Wunused-variable"
43 #pragma clang diagnostic ignored "-Wweak-vtables"
44 #pragma clang diagnostic ignored "-Wunused-private-field"
45 #pragma clang diagnostic ignored "-Wmissing-field-initializers"
46 #pragma clang diagnostic ignored "-Wconversion"
47 #pragma clang diagnostic ignored "-Wunused-function"
48 #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
49#elif defined(__GNUC__)
50 #pragma GCC diagnostic push
51 #pragma GCC diagnostic ignored "-Wcast-function-type"
52 #pragma GCC diagnostic ignored "-Wclass-memaccess"
53 #pragma GCC diagnostic ignored "-Wconversion"
54 #pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
55 #pragma GCC diagnostic ignored "-Wdeprecated-copy"
56 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
57 #pragma GCC diagnostic ignored "-Wdeprecated"
58 #pragma GCC diagnostic ignored "-Wextra-semi"
59 #pragma GCC diagnostic ignored "-Wignored-qualifiers"
60 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
61 #pragma GCC diagnostic ignored "-Wmisleading-indentation"
62 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
63 #pragma GCC diagnostic ignored "-Wmissing-noreturn"
64 #pragma GCC diagnostic ignored "-Wold-style-cast"
65 #pragma GCC diagnostic ignored "-Wredundant-decls"
66 #pragma GCC diagnostic ignored "-Wshadow"
67 #pragma GCC diagnostic ignored "-Wsign-compare"
68 #pragma GCC diagnostic ignored "-Wsign-conversion"
69 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
70 #pragma GCC diagnostic ignored "-Wswitch-default"
71 #pragma GCC diagnostic ignored "-Wundef"
72 #pragma GCC diagnostic ignored "-Wuninitialized"
73 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
74 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
75 #pragma GCC diagnostic ignored "-Wunused-parameter"
76 #pragma GCC diagnostic ignored "-Wunused-result"
77 #pragma GCC diagnostic ignored "-Wunused-variable"
78 #pragma GCC diagnostic ignored "-Wunused-function"
79#elif defined(_MSC_VER)
80 #pragma warning(push)
81 #pragma warning(disable : 26439) // This kind of function may not throw. Declare it 'noexcept'
82 #pragma warning(disable : 26451) // Arithmetic overflow.
83 #pragma warning(disable : 26495) // Variable '%variable%' is uninitialized.
84 #pragma warning(disable : 26812) // Prefer 'enum class' over 'enum'.
85 #pragma warning(disable : 4005) // macro redefintion.
86 #pragma warning(disable : 4018) // sign/unsign mismatch in comparison.
87 #pragma warning(disable : 4101) // unreferenced local variable.
88 #pragma warning(disable : 4244) // int conversion, possible loss of data.
89 #pragma warning(disable : 4251) // 'type' : class 'type1' needs to have dll-interface to be used
90 // by clients of class 'type2'
91 #pragma warning(disable : 4267) // size_t conversion, possible loss of data.
92 #pragma warning(disable : 4305) // conversion to smaller type, possible loss of data.
93 #pragma warning(disable : 4275) // non dll-interface class 'std::exception' used as base for dll-interface class 'openvdb::v10_0::Exception' FIXME
94 #pragma warning(disable : 4477) // mismatch in printf argument types.
95 #pragma warning(disable : 4828) // File contain illegal character.
96 #pragma warning(disable : 4996) // Using deprecated methods.
97#endif