From e008ddb971f6d7ced517950e63ed89479b6d328b Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 1 Jun 2014 09:22:27 -0700 Subject: [PATCH] Fix clang error and some warnings --- test/boost_has_pthread_yield.ipp | 1 + test/boost_no_cxx11_ref_qualifiers.ipp | 2 +- test/boost_no_lambdas.ipp | 2 +- test/boost_no_std_allocator.ipp | 2 ++ test/boost_no_unified_init.ipp | 2 ++ 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/boost_has_pthread_yield.ipp b/test/boost_has_pthread_yield.ipp index 625117a0..37046d32 100644 --- a/test/boost_has_pthread_yield.ipp +++ b/test/boost_has_pthread_yield.ipp @@ -18,6 +18,7 @@ void f() { // this is never called, it just has to compile: int res = pthread_yield(); + (void)res; } int test() diff --git a/test/boost_no_cxx11_ref_qualifiers.ipp b/test/boost_no_cxx11_ref_qualifiers.ipp index 4cd8441c..77d1234a 100644 --- a/test/boost_no_cxx11_ref_qualifiers.ipp +++ b/test/boost_no_cxx11_ref_qualifiers.ipp @@ -22,7 +22,7 @@ struct G int test() { G m; - const G c; + const G c = G(); if (m.get() != 'l') return 1; if (c.get() != 'c') return 1; diff --git a/test/boost_no_lambdas.ipp b/test/boost_no_lambdas.ipp index 689f90b6..be412261 100644 --- a/test/boost_no_lambdas.ipp +++ b/test/boost_no_lambdas.ipp @@ -18,7 +18,7 @@ namespace boost_no_cxx11_lambdas { int test() { - [](){}; + (void)[](){}; return 0; } diff --git a/test/boost_no_std_allocator.ipp b/test/boost_no_std_allocator.ipp index da88386b..1c730f39 100644 --- a/test/boost_no_std_allocator.ipp +++ b/test/boost_no_std_allocator.ipp @@ -53,6 +53,8 @@ int test_allocator(const T& i) // and isn't currently required by anything in boost // so don't test for now... // a3 = a2; + + (void)a2; return 0; } diff --git a/test/boost_no_unified_init.ipp b/test/boost_no_unified_init.ipp index a28a223a..428c8f43 100644 --- a/test/boost_no_unified_init.ipp +++ b/test/boost_no_unified_init.ipp @@ -23,6 +23,8 @@ struct AltStruct { public: AltStruct(int x, double y) : x_{x}, y_{y} {} + int X() const { return x_; } + double Y() const { return y_; } private: int x_; double y_;