diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 3 | ||||
-rw-r--r-- | intern/opencolorio/ocio_impl.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 11 |
4 files changed, 20 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 10ae610b63d..b2f6d92eddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1992,6 +1992,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS -Wunused-macros) # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros) + # flags to undo strict flags + ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter) + ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros) + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index f3e00be4c53..0b952372719 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -504,6 +504,9 @@ macro(remove_strict_flags) remove_cc_flag("-Wunused-variable") remove_cc_flag("-Werror=[^ ]+") remove_cc_flag("-Werror") + + # negate flags implied by '-Wall' + add_cc_flag("${CC_REMOVE_STRICT_FLAGS}") endif() if(MSVC) diff --git a/intern/opencolorio/ocio_impl.h b/intern/opencolorio/ocio_impl.h index 64cf5ec3322..b6bbc912e5b 100644 --- a/intern/opencolorio/ocio_impl.h +++ b/intern/opencolorio/ocio_impl.h @@ -30,7 +30,7 @@ class IOCIOImpl { public: - virtual ~IOCIOImpl() {}; + virtual ~IOCIOImpl() {} virtual OCIO_ConstConfigRcPtr *getCurrentConfig(void) = 0; virtual void setCurrentConfig(const OCIO_ConstConfigRcPtr *config) = 0; @@ -99,7 +99,7 @@ public: class FallbackImpl : public IOCIOImpl { public: - FallbackImpl() {}; + FallbackImpl() {} OCIO_ConstConfigRcPtr *getCurrentConfig(void); void setCurrentConfig(const OCIO_ConstConfigRcPtr *config); diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 49be60dda36..41913574c4d 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -2218,6 +2218,13 @@ void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const flo len_v2(dirs[3]), }; + /* variable 'area' is just for storage, + * the order its initialized doesn't matter */ +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunsequenced" +#endif + /* inline mean_value_half_tan four times here */ float t[4] = { MEAN_VALUE_HALF_TAN_V2(area, 0, 1), @@ -2226,6 +2233,10 @@ void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const flo MEAN_VALUE_HALF_TAN_V2(area, 3, 0), }; +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + #undef MEAN_VALUE_HALF_TAN_V2 w[0] = (t[3] + t[0]) / lens[0]; |