From a7728634f0a641672747c578f83a1245881d54a4 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 8 Feb 2021 17:50:29 +0100 Subject: [PATCH] Clang: silence -Wdeprecated-declarations for now RPi: hopefully silence a warning --- CMakeLists.txt | 7 +++++++ src/libslic3r/SLA/Rotfinder.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c32fc6b7b..1a751eafe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,13 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP add_compile_options(-Wno-ignored-attributes) # Tamas: Eigen include dirs are marked as SYSTEM endif() + # Clang reports legacy OpenGL calls as deprecated. Turn off the warning for now + # to reduce the clutter, we know about this one. It should be reenabled after + # we finally get rid of the deprecated code. + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + add_compile_options(-Wno-deprecated-declarations) + endif() + #GCC generates loads of -Wunknown-pragmas when compiling igl. The fix is not easy due to a bug in gcc, see # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 or # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431 diff --git a/src/libslic3r/SLA/Rotfinder.cpp b/src/libslic3r/SLA/Rotfinder.cpp index 937897766..702690c19 100644 --- a/src/libslic3r/SLA/Rotfinder.cpp +++ b/src/libslic3r/SLA/Rotfinder.cpp @@ -165,7 +165,7 @@ XYRotation from_transform3d(const Transform3d &tr) template std::array find_min_score(Fn &&fn, It from, It to, StopCond &&stopfn) { - std::array ret; + std::array ret = {}; double score = std::numeric_limits::max();