Fix warnings

- use `(void)` to avoid "unused parameter" warnings
 - Move to clang-3.6 for thread sanitizer - found bug in 3.5's reporting
This commit is contained in:
Jason Turner
2015-06-02 13:53:07 -06:00
parent 7522a19af5
commit 85a6d85c1f
2 changed files with 5 additions and 3 deletions

View File

@@ -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 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" - name: "clang"
build_tag: ThreadSanitizer build_tag: ThreadSanitizer
version: "3.5" version: "3.6"
skip_packaging: true 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 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" - name: "gcc"

View File

@@ -67,7 +67,7 @@ namespace chaiscript
#ifdef CHAISCRIPT_GCC_4_6 #ifdef CHAISCRIPT_GCC_4_6
/// \todo REMOVE THIS WHEN WE DROP G++4.6 /// \todo REMOVE THIS WHEN WE DROP G++4.6
// Forward declaration // Forward declaration
template<typename ... Rest> template<typename ... Rest>
struct Try_Cast; struct Try_Cast;
@@ -189,7 +189,8 @@ namespace chaiscript
const std::vector<Boxed_Value> &params, const Type_Conversions &t_conversions) const std::vector<Boxed_Value> &params, const Type_Conversions &t_conversions)
{ {
try { try {
std::initializer_list<void *>{(boxed_cast<Params>(params[I], &t_conversions), nullptr)...}; (void)params; (void)t_conversions;
(void)std::initializer_list<int>{(boxed_cast<Params>(params[I], &t_conversions), 0)...};
return true; return true;
} catch (const exception::bad_boxed_cast &) { } catch (const exception::bad_boxed_cast &) {
return false; return false;
@@ -209,6 +210,7 @@ namespace chaiscript
Ret call_func(Indexes<I...>, const std::function<Ret (Params...)> &f, Ret call_func(Indexes<I...>, const std::function<Ret (Params...)> &f,
const std::vector<Boxed_Value> &params, const Type_Conversions &t_conversions) const std::vector<Boxed_Value> &params, const Type_Conversions &t_conversions)
{ {
(void)params; (void)t_conversions;
return f(boxed_cast<Params>(params[I], &t_conversions)...); return f(boxed_cast<Params>(params[I], &t_conversions)...);
} }