diff --git a/include/boost/array.hpp b/include/boost/array.hpp index 3b1c0b0..8ef73c4 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -211,19 +211,19 @@ namespace boost { } // operator[] - reference operator[](size_type i) + reference operator[](size_type /*i*/) { return failed_rangecheck(); } - const_reference operator[](size_type i) const + const_reference operator[](size_type /*i*/) const { return failed_rangecheck(); } // at() with range check - reference at(size_type i) { return failed_rangecheck(); } - const_reference at(size_type i) const { return failed_rangecheck(); } + reference at(size_type /*i*/) { return failed_rangecheck(); } + const_reference at(size_type /*i*/) const { return failed_rangecheck(); } // front() and back() reference front() @@ -252,7 +252,7 @@ namespace boost { static size_type max_size() { return 0; } enum { static_size = 0 }; - void swap (array& y) { + void swap (array& /*y*/) { } // direct access to data (read-only) diff --git a/test/array3.cpp b/test/array3.cpp index a4eac5d..b815fe7 100644 --- a/test/array3.cpp +++ b/test/array3.cpp @@ -21,7 +21,7 @@ int main() // copy and change order boost::array seasons_orig = seasons; - for (unsigned i=seasons.size()-1; i>0; --i) { + for (std::size_t i=seasons.size()-1; i>0; --i) { std::swap(seasons.at(i),seasons.at((i+1)%seasons.size())); } diff --git a/test/array5.cpp b/test/array5.cpp index d6c472a..23156b9 100644 --- a/test/array5.cpp +++ b/test/array5.cpp @@ -27,7 +27,7 @@ int main() typedef boost::array Array; // create and initialize an array - const Array a = { { 42.42 } }; + const Array a = { { 42.42f } }; // use some common STL container operations std::cout << "static_size: " << a.size() << std::endl;