From 7522a19af5fd4f4e6bba53a25ef777ba18b6a206 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 1 Jun 2015 16:08:04 -0600 Subject: [PATCH 1/2] g++4.6 correction --- include/chaiscript/chaiscript_defines.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/chaiscript_defines.hpp b/include/chaiscript/chaiscript_defines.hpp index 6d0fd99..5b3bea5 100644 --- a/include/chaiscript/chaiscript_defines.hpp +++ b/include/chaiscript/chaiscript_defines.hpp @@ -35,7 +35,7 @@ #define CHAISCRIPT_HAS_THREAD_LOCAL #endif -#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 6) #define CHAISCRIPT_GCC_4_6 #endif From 85a6d85c1f9143d38b63d2afdd6d122479757af4 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 2 Jun 2015 13:53:07 -0600 Subject: [PATCH 2/2] Fix warnings - use `(void)` to avoid "unused parameter" warnings - Move to clang-3.6 for thread sanitizer - found bug in 3.5's reporting --- .decent_ci-Linux.yaml | 2 +- include/chaiscript/dispatchkit/proxy_functions_detail.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.decent_ci-Linux.yaml b/.decent_ci-Linux.yaml index 6f7125f..25cb343 100644 --- a/.decent_ci-Linux.yaml +++ b/.decent_ci-Linux.yaml @@ -15,7 +15,7 @@ compilers: cmake_extra_flags: -DUSE_LIBCXX:BOOL=OFF -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_ADDRESS_SANITIZER:BOOL=ON - name: "clang" build_tag: ThreadSanitizer - version: "3.5" + version: "3.6" skip_packaging: true cmake_extra_flags: -DUSE_LIBCXX:BOOL=OFF -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_THREAD_SANITIZER:BOOL=ON - name: "gcc" diff --git a/include/chaiscript/dispatchkit/proxy_functions_detail.hpp b/include/chaiscript/dispatchkit/proxy_functions_detail.hpp index a98124b..ccfe83f 100644 --- a/include/chaiscript/dispatchkit/proxy_functions_detail.hpp +++ b/include/chaiscript/dispatchkit/proxy_functions_detail.hpp @@ -67,7 +67,7 @@ namespace chaiscript #ifdef CHAISCRIPT_GCC_4_6 /// \todo REMOVE THIS WHEN WE DROP G++4.6 - + // Forward declaration template struct Try_Cast; @@ -189,7 +189,8 @@ namespace chaiscript const std::vector ¶ms, const Type_Conversions &t_conversions) { try { - std::initializer_list{(boxed_cast(params[I], &t_conversions), nullptr)...}; + (void)params; (void)t_conversions; + (void)std::initializer_list{(boxed_cast(params[I], &t_conversions), 0)...}; return true; } catch (const exception::bad_boxed_cast &) { return false; @@ -209,6 +210,7 @@ namespace chaiscript Ret call_func(Indexes, const std::function &f, const std::vector ¶ms, const Type_Conversions &t_conversions) { + (void)params; (void)t_conversions; return f(boxed_cast(params[I], &t_conversions)...); }