diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-23 23:37:52 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-23 23:37:52 +0000 |
commit | fd838227411f3ce1fa348f1d334266231bbcc84d (patch) | |
tree | 204de9a3dad8b79d83bba224d8f6d4775169483f | |
parent | 16166a4d71fca27f454a0837465143700dd41e98 (diff) | |
download | bcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.tar.gz bcm5719-llvm-fd838227411f3ce1fa348f1d334266231bbcc84d.zip |
Fix unused parameters and variables
llvm-svn: 290459
120 files changed, 305 insertions, 266 deletions
diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 4c94fe5a376..485a6c13af4 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -1428,7 +1428,7 @@ private: __node_alloc() = __t.__node_alloc(); } _LIBCPP_INLINE_VISIBILITY - void __copy_assign_alloc(const __tree& __t, false_type) {} + void __copy_assign_alloc(const __tree&, false_type) {} void __move_assign(__tree& __t, false_type); void __move_assign(__tree& __t, true_type) @@ -1448,7 +1448,7 @@ private: _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) {__node_alloc() = _VSTD::move(__t.__node_alloc());} _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(__tree& __t, false_type) _NOEXCEPT {} + void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {} __node_pointer __detach(); static __node_pointer __detach(__node_pointer); diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 89e138b18c2..c4bf5991b63 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1754,7 +1754,9 @@ _BidirectionalIterator2 copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) { - return _VSTD::__copy_backward(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)); + return _VSTD::__copy_backward(__unwrap_iter(__first), + __unwrap_iter(__last), + __unwrap_iter(__result)); } // copy_if @@ -4895,7 +4897,8 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) template <class _Compare, class _RandomAccessIterator> void -__sift_down(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, +__sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/, + _Compare __comp, typename iterator_traits<_RandomAccessIterator>::difference_type __len, _RandomAccessIterator __start) { diff --git a/libcxx/include/complex b/libcxx/include/complex index 4d122e9373a..22f568f555e 100644 --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -844,7 +844,7 @@ imag(const complex<_Tp>& __c) template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename __libcpp_complex_overload_traits<_Tp>::_ValueType -imag(_Tp __re) +imag(_Tp) { return 0; } diff --git a/libcxx/include/exception b/libcxx/include/exception index d8b8cce0254..98e1f37f919 100644 --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -163,6 +163,7 @@ make_exception_ptr(_Ep __e) _NOEXCEPT return current_exception(); } #else + ((void)__e); _VSTD::abort(); #endif } @@ -208,6 +209,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t)); +#else + ((void)__t); + // FIXME: Make this abort. #endif } @@ -228,6 +232,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw _VSTD::forward<_Tp>(__t); +#else + ((void)__t); + // FIXME: Make this abort #endif } diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem index 410235f11a3..739918bb2cb 100644 --- a/libcxx/include/experimental/filesystem +++ b/libcxx/include/experimental/filesystem @@ -1218,14 +1218,18 @@ private: template <class... _Args> _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +#ifndef _LIBCPP_NO_EXCEPTIONS void __throw_filesystem_error(_Args && ...__args) { -#ifndef _LIBCPP_NO_EXCEPTIONS throw filesystem_error(std::forward<_Args>(__args)...); +} #else +void __throw_filesystem_error(_Args&&...) +{ _VSTD::abort(); -#endif } +#endif + // operational functions diff --git a/libcxx/include/experimental/optional b/libcxx/include/experimental/optional index 57c5335f637..8dcda652319 100644 --- a/libcxx/include/experimental/optional +++ b/libcxx/include/experimental/optional @@ -721,7 +721,7 @@ template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY constexpr bool -operator<=(nullopt_t, const optional<_Tp>& __x) noexcept +operator<=(nullopt_t, const optional<_Tp>&) noexcept { return true; } @@ -739,7 +739,7 @@ template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY constexpr bool -operator>(nullopt_t, const optional<_Tp>& __x) noexcept +operator>(nullopt_t, const optional<_Tp>&) noexcept { return false; } diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index a75d6e978d9..d70f7eddef6 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -531,7 +531,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(__forward_list_base& __x, false_type) _NOEXCEPT + void __move_assign_alloc(__forward_list_base&, false_type) _NOEXCEPT {} _LIBCPP_INLINE_VISIBILITY void __move_assign_alloc(__forward_list_base& __x, true_type) @@ -1426,7 +1426,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, template <class _Tp, class _Alloc> void forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, - forward_list& __x, + forward_list& /*__other*/, const_iterator __i) { const_iterator __lm1 = _VSTD::next(__i); @@ -1441,7 +1441,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, template <class _Tp, class _Alloc> void forward_list<_Tp, _Alloc>::splice_after(const_iterator __p, - forward_list& __x, + forward_list& /*__other*/, const_iterator __f, const_iterator __l) { if (__f != __l && __p != __f) diff --git a/libcxx/include/iterator b/libcxx/include/iterator index 657236d9347..2a859c54df9 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -1751,13 +1751,13 @@ template <class _Cont> constexpr auto size(const _Cont& __c) -> decltype(__c.size()) { return __c.size(); } template <class _Tp, size_t _Sz> -constexpr size_t size(const _Tp (&__array)[_Sz]) noexcept { return _Sz; } +constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; } template <class _Cont> constexpr auto empty(const _Cont& __c) -> decltype(__c.empty()) { return __c.empty(); } template <class _Tp, size_t _Sz> -constexpr bool empty(const _Tp (&__array)[_Sz]) noexcept { return false; } +constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; } template <class _Ep> constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; } diff --git a/libcxx/include/list b/libcxx/include/list index e44bcf26a42..220a40205c4 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -655,7 +655,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __copy_assign_alloc(const __list_imp& __c, false_type) + void __copy_assign_alloc(const __list_imp&, false_type) {} _LIBCPP_INLINE_VISIBILITY @@ -666,7 +666,7 @@ private: } _LIBCPP_INLINE_VISIBILITY - void __move_assign_alloc(__list_imp& __c, false_type) + void __move_assign_alloc(__list_imp&, false_type) _NOEXCEPT {} }; @@ -2336,14 +2336,14 @@ list<_Tp, _Alloc>::__decrementable(const const_iterator* __i) const template <class _Tp, class _Alloc> bool -list<_Tp, _Alloc>::__addable(const const_iterator* __i, ptrdiff_t __n) const +list<_Tp, _Alloc>::__addable(const const_iterator*, ptrdiff_t) const { return false; } template <class _Tp, class _Alloc> bool -list<_Tp, _Alloc>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const +list<_Tp, _Alloc>::__subscriptable(const const_iterator*, ptrdiff_t) const { return false; } diff --git a/libcxx/include/locale b/libcxx/include/locale index adb03af94e7..2bda44d6bcd 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -3932,7 +3932,8 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz), static_cast<streamsize>(__extbufend_ - __extbufnext_)); codecvt_base::result __r; - state_type __svs = __st_; + // FIXME: Do we ever need to restore the state here? + //state_type __svs = __st_; streamsize __nr = __bufptr_->sgetn(const_cast<char*>(__extbufnext_), __nmemb); if (__nr != 0) { diff --git a/libcxx/include/memory b/libcxx/include/memory index 8a3237f3238..b4c2b35c0b7 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -1605,7 +1605,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits is_trivially_move_constructible<_Tp>::value, void >::type - __construct_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) + __construct_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) { ptrdiff_t _Np = __end1 - __begin1; if (_Np > 0) @@ -1635,7 +1635,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits is_trivially_move_constructible<_Tp>::value, void >::type - __construct_range_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) + __construct_range_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) { typedef typename remove_const<_Tp>::type _Vp; ptrdiff_t _Np = __end1 - __begin1; @@ -1669,7 +1669,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits is_trivially_move_constructible<_Tp>::value, void >::type - __construct_backward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __end2) + __construct_backward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __end2) { ptrdiff_t _Np = __end1 - __begin1; __end2 -= _Np; @@ -2109,7 +2109,7 @@ public: template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> _LIBCPP_INLINE_VISIBILITY - __libcpp_compressed_pair_imp(piecewise_construct_t __pc, + __libcpp_compressed_pair_imp(piecewise_construct_t, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args, __tuple_indices<_I1...>, @@ -2164,7 +2164,7 @@ public: template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> _LIBCPP_INLINE_VISIBILITY - __libcpp_compressed_pair_imp(piecewise_construct_t __pc, + __libcpp_compressed_pair_imp(piecewise_construct_t, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args, __tuple_indices<_I1...>, @@ -2220,7 +2220,7 @@ public: template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> _LIBCPP_INLINE_VISIBILITY - __libcpp_compressed_pair_imp(piecewise_construct_t __pc, + __libcpp_compressed_pair_imp(piecewise_construct_t, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args, __tuple_indices<_I1...>, @@ -2274,7 +2274,7 @@ public: template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> _LIBCPP_INLINE_VISIBILITY - __libcpp_compressed_pair_imp(piecewise_construct_t __pc, + __libcpp_compressed_pair_imp(piecewise_construct_t, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args, __tuple_indices<_I1...>, diff --git a/libcxx/include/optional b/libcxx/include/optional index c64aa8f7f72..735ef479e02 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1080,7 +1080,7 @@ operator<=(const optional<_Tp>& __x, nullopt_t) noexcept template <class _Tp> _LIBCPP_INLINE_VISIBILITY constexpr bool -operator<=(nullopt_t, const optional<_Tp>& __x) noexcept +operator<=(nullopt_t, const optional<_Tp>&) noexcept { return true; } @@ -1096,7 +1096,7 @@ operator>(const optional<_Tp>& __x, nullopt_t) noexcept template <class _Tp> _LIBCPP_INLINE_VISIBILITY constexpr bool -operator>(nullopt_t, const optional<_Tp>& __x) noexcept +operator>(nullopt_t, const optional<_Tp>&) noexcept { return false; } diff --git a/libcxx/include/set b/libcxx/include/set index 606af726abf..8e4c2ae6a60 100644 --- a/libcxx/include/set +++ b/libcxx/include/set @@ -1023,7 +1023,7 @@ public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __v) - {return __tree_.__insert_multi(_VSTD::move(__v));} + {return __tree_.__insert_multi(__p, _VSTD::move(__v));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept index b9dd2853f28..d501d091608 100644 --- a/libcxx/include/stdexcept +++ b/libcxx/include/stdexcept @@ -191,7 +191,8 @@ void __throw_logic_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw logic_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -201,7 +202,8 @@ void __throw_domain_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw domain_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -211,7 +213,8 @@ void __throw_invalid_argument(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw invalid_argument(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -221,7 +224,8 @@ void __throw_length_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw length_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -231,7 +235,8 @@ void __throw_out_of_range(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw out_of_range(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -241,7 +246,8 @@ void __throw_range_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw range_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -251,7 +257,8 @@ void __throw_overflow_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw overflow_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } @@ -261,7 +268,8 @@ void __throw_underflow_error(const char*__msg) #ifndef _LIBCPP_NO_EXCEPTIONS throw underflow_error(__msg); #else - _VSTD::abort(); + ((void)__msg); + _VSTD::abort(); #endif } diff --git a/libcxx/include/string b/libcxx/include/string index 840fd0098ca..2e5ffc1b6d0 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -2220,7 +2220,7 @@ bool __ptr_in_range (const _Tp* __p, const _Tp* __first, const _Tp* __last) } template <class _Tp1, class _Tp2> -bool __ptr_in_range (const _Tp1* __p, const _Tp2* __first, const _Tp2* __last) +bool __ptr_in_range (const _Tp1*, const _Tp2*, const _Tp2*) { return false; } diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 55469894955..50be81e461f 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -922,6 +922,8 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_map::insert(const_iterator, const value_type&) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__p); #endif return insert(__x).first; } @@ -946,6 +948,8 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_map::insert(const_iterator, const value_type&) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__p); #endif return __table_.__insert_unique(_VSTD::move(__x)).first; } @@ -965,6 +969,8 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_map::insert(const_iterator, value_type&&) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__p); #endif return insert(_VSTD::forward<_Pp>(__x)).first; } @@ -982,6 +988,8 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_map::emplace_hint(const_iterator, args...) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__p); #endif return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first; } @@ -1015,8 +1023,10 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this, "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__h); #endif - return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first; + return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first; } template <class... _Args> @@ -1027,6 +1037,8 @@ public: _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this, "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" " referring to this unordered_map"); +#else + ((void)__h); #endif return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first; } @@ -1057,15 +1069,17 @@ public: template <class _Vp> _LIBCPP_INLINE_VISIBILITY - iterator insert_or_assign(const_iterator __h, const key_type& __k, _Vp&& __v) + iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v) { + // FIXME: Add debug mode checking for the iterator input return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first; } template <class _Vp> _LIBCPP_INLINE_VISIBILITY - iterator insert_or_assign(const_iterator __h, key_type&& __k, _Vp&& __v) + iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v) { + // FIXME: Add debug mode checking for the iterator input return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first; } #endif diff --git a/libcxx/include/vector b/libcxx/include/vector index f175e47be9a..3dae3b5df53 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -821,30 +821,40 @@ private: // We call annotatations only for the default Allocator because other allocators // may not meet the AddressSanitizer alignment constraints. // See the documentation for __sanitizer_annotate_contiguous_container for more details. - void __annotate_contiguous_container - (const void *__beg, const void *__end, const void *__old_mid, const void *__new_mid) const - { #ifndef _LIBCPP_HAS_NO_ASAN + void __annotate_contiguous_container(const void *__beg, const void *__end, + const void *__old_mid, + const void *__new_mid) const + { + if (__beg && is_same<allocator_type, __default_allocator_type>::value) __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid); -#endif } - - void __annotate_new(size_type __current_size) const - { +#else + _LIBCPP_INLINE_VISIBILITY + void __annotate_contiguous_container(const void*, const void*, const void*, + const void*) const {} +#endif + _LIBCPP_INLINE_VISIBILITY + void __annotate_new(size_type __current_size) const { __annotate_contiguous_container(data(), data() + capacity(), data() + capacity(), data() + __current_size); } - void __annotate_delete() const - { + + _LIBCPP_INLINE_VISIBILITY + void __annotate_delete() const { __annotate_contiguous_container(data(), data() + capacity(), data() + size(), data() + capacity()); } + + _LIBCPP_INLINE_VISIBILITY void __annotate_increase(size_type __n) const { __annotate_contiguous_container(data(), data() + capacity(), data() + size(), data() + size() + __n); } + + _LIBCPP_INLINE_VISIBILITY void __annotate_shrink(size_type __old_size) const { __annotate_contiguous_container(data(), data() + capacity(), @@ -869,8 +879,9 @@ private: }; #else struct __RAII_IncreaseAnnotator { - inline __RAII_IncreaseAnnotator(const vector &, size_type __n = 1) {} - inline void __done() {} + _LIBCPP_INLINE_VISIBILITY + __RAII_IncreaseAnnotator(const vector &, size_type = 1) {} + _LIBCPP_INLINE_VISIBILITY void __done() {} }; #endif @@ -2914,7 +2925,9 @@ typename enable_if vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) { clear(); - difference_type __n = _VSTD::distance(__first, __last); + difference_type __ns = _VSTD::distance(__first, __last); + _LIBCPP_ASSERT(__ns >= 0, "invalid range specified"); + const size_t __n = static_cast<size_type>(__ns); if (__n) { if (__n > capacity()) diff --git a/libcxx/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp index 08c10d34a01..4ef64a34be0 100644 --- a/libcxx/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/list/db_iterators_8.pass.cpp @@ -28,4 +28,5 @@ int main() C::iterator i = c.end(); T j = *i; assert(false); + ((void)j); } diff --git a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp index 75e2aeb064e..cee34fa029d 100644 --- a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp +++ b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp @@ -31,5 +31,5 @@ int main() assert(myconv.converted() == 4); // move construct a new converter and make sure the state is the same. Myconv myconv2(std::move(myconv)); - assert(myconv2.converted() == 4); + assert(myconv2.converted() == old_converted); } diff --git a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp index 1419b6c9a0d..9123be1f099 100644 --- a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp @@ -23,11 +23,10 @@ #include <cmath> -constexpr bool a = std::__libcpp_isnan(0.); -constexpr bool b = std::__libcpp_isinf(0.0); -constexpr bool c = std::__libcpp_isfinite(0.0); +static_assert(std::__libcpp_isnan(0.) == false, ""); +static_assert(std::__libcpp_isinf(0.0) == false, ""); +static_assert(std::__libcpp_isfinite(0.0) == true, ""); int main() { - return 0; } diff --git a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp index 278217e0484..815502f1cca 100644 --- a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp @@ -18,5 +18,7 @@ int main() { std::complex<double> cd; + ((void)cd); double x = std::sin(0); + ((void)x); } diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 59b3394fd13..26e7a447a25 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -659,11 +659,11 @@ class Configuration(object): # These warnings should be enabled in order to support the MSVC # team using the test suite; They enable the warnings below and # expect the test suite to be clean. - # FIXME: Re-enable this after fixing remaining occurrences. self.cxx.addWarningFlagIfSupported('-Wno-sign-compare') + self.cxx.addWarningFlagIfSupported('-Wunused-variable') + self.cxx.addWarningFlagIfSupported('-Wunused-parameter') # FIXME: Enable the two warnings below. - self.cxx.addWarningFlagIfSupported('-Wno-unused-variable') - self.cxx.addWarningFlagIfSupported('-Wno-unused-parameter') + self.cxx.addWarningFlagIfSupported('-Wno-conversion') # TODO(EricWF) Remove the unused warnings once the test suite # compiles clean with them. self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef') diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp index 509c751b455..7fb1568c061 100644 --- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp +++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp @@ -266,6 +266,7 @@ void test_derived_from_ref_wrap() { auto& ret2 = std::__invoke(get_fn, d); auto& cret2 = std::__invoke_constexpr(get_fn, d); assert(&ret2 == &x); + assert(&cret2 == &x); auto& ret3 = std::__invoke(get_fn, r2); assert(&ret3 == &x); } @@ -367,4 +368,4 @@ int main() { test_derived_from_ref_wrap(); #endif -}
\ No newline at end of file +} diff --git a/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp index e619a7a5429..ad32ff713f5 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp @@ -21,4 +21,5 @@ int main() typedef std::unordered_multimap<int, int> M2; M2::iterator i; M1::iterator j = i; + ((void)j); } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp index 57e6b98c747..092f3dd9115 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp @@ -47,7 +47,10 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); assert(c.size() == 5); typedef std::pair<C::const_iterator, C::const_iterator> Eq; @@ -93,7 +96,10 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); assert(c.size() == 5); typedef std::pair<C::const_iterator, C::const_iterator> Eq; diff --git a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp index 117e8e68efa..362697b2c8e 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp @@ -45,7 +45,11 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); + assert(c.size() == 5); assert(c.count(1) == 2); assert(c.count(2) == 1); @@ -68,7 +72,10 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); assert(c.size() == 5); assert(c.count(1) == 2); assert(c.count(2) == 1); diff --git a/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp index dfd144bb317..aec6950c48f 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp @@ -21,4 +21,5 @@ int main() typedef std::unordered_multiset<int> M2; M2::iterator i; M1::iterator j = i; + ((void)j); } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp index 71384f40283..9fbb773a463 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -29,23 +31,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, test_allocator<int> > C; - typedef int P; - P a[] = - { - P(1), - P(2), - P(3), - P(4), - P(1), - P(2) - }; C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -105,23 +96,12 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, min_allocator<int> > C; - typedef int P; - P a[] = - { - P(1), - P(2), - P(3), - P(4), - P(1), - P(2) - }; C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -181,7 +161,6 @@ int main() assert(c0.empty()); } -#endif #if _LIBCPP_DEBUG >= 1 { std::unordered_multiset<int> s1 = {1, 2, 3}; @@ -193,5 +172,4 @@ int main() assert(s2.size() == 2); } #endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp index c78eb138fd9..b584dbb2b30 100644 --- a/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/erase_const_iter.pass.cpp @@ -45,7 +45,11 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); + assert(c.size() == 3); assert(c.count(1) == 1); assert(c.count(3) == 1); @@ -66,7 +70,11 @@ int main() }; C c(a, a + sizeof(a)/sizeof(a[0])); C::const_iterator i = c.find(2); + C::const_iterator i_next = i; + ++i_next; C::iterator j = c.erase(i); + assert(j == i_next); + assert(c.size() == 3); assert(c.count(1) == 1); assert(c.count(3) == 1); diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp index c5200bf7511..0910bf15f8e 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -29,23 +31,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set<int, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, test_allocator<int> > C; - typedef int P; - P a[] = - { - P(1), - P(2), - P(3), - P(4), - P(1), - P(2) - }; C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -105,23 +96,12 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, min_allocator<int> > C; - typedef int P; - P a[] = - { - P(1), - P(2), - P(3), - P(4), - P(1), - P(2) - }; C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -181,7 +161,6 @@ int main() assert(c0.empty()); } -#endif #if _LIBCPP_DEBUG >= 1 { std::unordered_set<int> s1 = {1, 2, 3}; @@ -193,5 +172,4 @@ int main() assert(s2.size() == 2); } #endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/libcxx/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp index 7efbafff83c..47fe52f7b1d 100644 --- a/libcxx/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp +++ b/libcxx/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp @@ -98,6 +98,8 @@ void checkThrows(any& a) } catch (...) { assert(false); } +#else + ((void)a); #endif } @@ -176,7 +178,6 @@ void test_cast_to_value() { Type::reset(); { any a((Type(42))); - any const& ca = a; assert(Type::count == 1); assert(Type::copied == 0); assert(Type::moved == 1); diff --git a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp index e8d150f1e39..4b7ad735c7f 100644 --- a/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/class.path/path.nonmember/path.io.pass.cpp @@ -40,7 +40,6 @@ void doIOTest() { using namespace fs; using Ptr = const CharT*; using StrStream = std::basic_stringstream<CharT>; - const char* const InCStr = InStr; const Ptr E = OutStr; const path p((const char*)InStr); StrStream ss; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp index db10da092ef..c9b42b3596a 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp @@ -60,6 +60,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)t); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp index 1b56c709797..8c5241c71af 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp @@ -62,6 +62,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)t); ((void)ec); return true; #endif }; @@ -138,7 +139,6 @@ TEST_CASE(test_attributes_get_copied) const path file = env.create_file("file1", 42); const path dest = env.make_env_path("file2"); auto st = status(file); - perms default_perms = st.permissions(); perms new_perms = perms::owner_read; permissions(file, new_perms); std::error_code ec; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp index 6fae1119520..fe472980677 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp @@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)t); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp index e0473754cc8..85a3b6cb346 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp @@ -37,21 +37,6 @@ TEST_CASE(test_signatures) TEST_CASE(test_error_reporting) { - auto checkThrow = [](path const& f, path const& t, const std::error_code& ec) - { -#ifndef TEST_HAS_NO_EXCEPTIONS - try { - fs::create_directory_symlink(f, t); - return true; - } catch (filesystem_error const& err) { - return err.path1() == f - && err.code() == ec; - } -#else - return true; -#endif - }; - scoped_test_env env; const path file = env.create_file("file1", 42); const path file2 = env.create_file("file2", 55); diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp index 4a865fdee7e..7aefece46a4 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp @@ -36,21 +36,6 @@ TEST_CASE(test_signatures) TEST_CASE(test_error_reporting) { - auto checkThrow = [](path const& f, path const& t, const std::error_code& ec) - { -#ifndef TEST_HAS_NO_EXCEPTIONS - try { - fs::create_hard_link(f, t); - return true; - } catch (filesystem_error const& err) { - return err.path1() == f - && err.code() == ec; - } -#else - return true; -#endif - }; - scoped_test_env env; const path file = env.create_file("file1", 42); const path file2 = env.create_file("file2", 55); diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp index 35ba57f3ab4..d261d987a1e 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp @@ -37,21 +37,6 @@ TEST_CASE(test_signatures) TEST_CASE(test_error_reporting) { - auto checkThrow = [](path const& f, path const& t, const std::error_code& ec) - { -#ifndef TEST_HAS_NO_EXCEPTIONS - try { - fs::create_symlink(f, t); - return true; - } catch (filesystem_error const& err) { - return err.path1() == f - && err.code() == ec; - } -#else - return true; -#endif - }; - scoped_test_env env; const path file = env.create_file("file1", 42); const path file2 = env.create_file("file2", 55); diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp index 8c7c0a78ad5..4177392141e 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp @@ -53,6 +53,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)opts); ((void)ec); return true; #endif }; @@ -116,7 +117,7 @@ TEST_CASE(basic_permissions_test) permissions(TC.p, TC.set_perms, ec); TEST_CHECK(!ec); auto pp = status(TC.p).permissions(); - TEST_CHECK(status(TC.p).permissions() == TC.expected); + TEST_CHECK(pp == TC.expected); } } diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp index 00581cbe8bc..d69e95ce5d5 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp @@ -51,6 +51,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp index edb0c4fc76c..f7ce8a30e64 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp @@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp index aecfce7885e..b84c18c1da0 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp @@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp index c2ae854c0bf..e265c7af6b1 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.rename/rename.pass.cpp @@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)t); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp index 8a6aa09b14c..f7c2ee14e83 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp @@ -52,6 +52,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)s); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp index 865191520be..8f241810fc7 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.space/space.pass.cpp @@ -57,6 +57,7 @@ TEST_CASE(test_error_reporting) && err.code() == ec; } #else + ((void)f); ((void)ec); return true; #endif }; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp index bc44f1f6cbb..467e09d5d2b 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp @@ -43,7 +43,7 @@ template <typename T> struct MyHash { }; template <typename Iter1, typename Iter2> -void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) { +void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) { std::experimental::boyer_moore_searcher<Iter2, MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>> s{b2, e2}; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp index 743ab92156b..ca8700bb44b 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp @@ -54,10 +54,12 @@ unsigned count_equal::count = 0; template <typename Iter1, typename Iter2> void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) { + count_equal::count = 0; std::experimental::boyer_moore_searcher<Iter2, MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2}; + assert(count_equal::count <= max_count); assert(result == std::experimental::search(b1, e1, s)); } @@ -78,7 +80,10 @@ test() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2); + int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); int ic[] = {1}; @@ -93,6 +98,7 @@ test() const unsigned sh = sizeof(ih)/sizeof(ih[0]); int ii[] = {1, 1, 2}; do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3); + } template <class Iter1, class Iter2> @@ -112,7 +118,10 @@ test2() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2); + char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); char ic[] = {1}; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp index b27cabd76ab..5877b9cd97b 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp @@ -54,7 +54,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2}; count_equal::count = 0; assert(result == std::experimental::search(b1, e1, s)); -// assert(count_equal::count <= max_count); + assert(count_equal::count <= max_count); } template <class Iter1, class Iter2> @@ -74,7 +74,10 @@ test() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2); + int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); int ic[] = {1}; @@ -108,7 +111,8 @@ test2() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2); char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); char ic[] = {1}; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp index 28a3f6d912f..abfab17d02c 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp @@ -42,7 +42,7 @@ template <typename T> struct MyHash { }; template <typename Iter1, typename Iter2> -void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) { +void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) { std::experimental::boyer_moore_horspool_searcher<Iter2, MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>> s{b2, e2}; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp index 3a6647dbc7f..e6a36a4dac2 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp @@ -57,7 +57,9 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2}; + count_equal::count = 0; assert(result == std::experimental::search(b1, e1, s)); + assert(count_equal::count <= max_count); } template <class Iter1, class Iter2> @@ -77,7 +79,8 @@ test() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2); int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); int ic[] = {1}; @@ -111,7 +114,8 @@ test2() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2); char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); char ic[] = {1}; diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp index 8c78b9de0b3..e621ad8cedc 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp @@ -53,7 +53,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2}; count_equal::count = 0; assert(result == std::experimental::search(b1, e1, s)); -// assert(count_equal::count <= max_count); + assert(count_equal::count <= max_count); } template <class Iter1, class Iter2> @@ -73,7 +73,8 @@ test() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2); int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); int ic[] = {1}; @@ -107,7 +108,8 @@ test2() do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa); do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa); do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa); - do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa); + // FIXME: The max_count for this search should be 'sa' + do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2); char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4}; const unsigned sb = sizeof(ib)/sizeof(ib[0]); char ic[] = {1}; diff --git a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp index f0e0cc56661..a52b50b391c 100644 --- a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp +++ b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.gcd/gcd.pass.cpp @@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index b1aa73400cf..e3c109f7447 100644 --- a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp b/libcxx/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp index 6c2d71d9a23..c4640789657 100644 --- a/libcxx/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp +++ b/libcxx/test/std/experimental/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp @@ -55,7 +55,7 @@ public: class Z { public: - Z(int i) {TEST_THROW(6);} + Z(int) {TEST_THROW(6);} }; diff --git a/libcxx/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp b/libcxx/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp index 07b1af96d10..f2d373c299b 100644 --- a/libcxx/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp +++ b/libcxx/test/std/experimental/optional/optional.object/optional.object.swap/swap.pass.cpp @@ -60,7 +60,7 @@ public: Z(Z&&) {TEST_THROW(7);} friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;} - friend void swap(Z& x, Z& y) {TEST_THROW(6);} + friend void swap(Z&, Z&) {TEST_THROW(6);} }; struct ConstSwappable { diff --git a/libcxx/test/std/experimental/optional/optional.specalg/swap.pass.cpp b/libcxx/test/std/experimental/optional/optional.specalg/swap.pass.cpp index 02d396758fb..4d643cb44b6 100644 --- a/libcxx/test/std/experimental/optional/optional.specalg/swap.pass.cpp +++ b/libcxx/test/std/experimental/optional/optional.specalg/swap.pass.cpp @@ -59,7 +59,7 @@ public: Z(Z&&) {TEST_THROW(7);} friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;} - friend void swap(Z& x, Z& y) {TEST_THROW(6);} + friend void swap(Z&, Z&) {TEST_THROW(6);} }; int main() diff --git a/libcxx/test/std/experimental/string.view/string.view.ops/substr.pass.cpp b/libcxx/test/std/experimental/string.view/string.view.ops/substr.pass.cpp index a651010d4b2..a3a1dbf418b 100644 --- a/libcxx/test/std/experimental/string.view/string.view.ops/substr.pass.cpp +++ b/libcxx/test/std/experimental/string.view/string.view.ops/substr.pass.cpp @@ -27,6 +27,7 @@ void test1 ( std::experimental::basic_string_view<CharT> sv, size_t n, size_t po try { std::experimental::basic_string_view<CharT> sv1 = sv.substr(pos, n); assert(false); + ((void)sv1); } catch (const std::out_of_range&) { return; } catch (...) { diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp index a5adf2d1f7f..0e46f91cfd1 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp @@ -25,4 +25,5 @@ int main() { P p1(2); P p2(std::move(p1)); + assert(*p2 == 2); } diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp index 8cf670a2540..488738d3207 100644 --- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp +++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp @@ -24,7 +24,7 @@ template <> struct hash<X> { typedef X first_argument_type; - size_t operator()(const first_argument_type& x1) const + size_t operator()(const first_argument_type&) const { return 99; } diff --git a/libcxx/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp b/libcxx/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp index f19a8211cda..485da33cdec 100644 --- a/libcxx/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp +++ b/libcxx/test/std/experimental/utilities/ratio/header.ratio.synop/includes.pass.cpp @@ -18,4 +18,5 @@ int main() { std::ratio<100> x; + ((void)x); } diff --git a/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp b/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp index 51f9ab6bee1..7ac96d2502d 100644 --- a/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp @@ -13,5 +13,6 @@ int main() { - std::experimental::erased_type e; + std::experimental::erased_type e; + ((void)e); } diff --git a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp index 004e7e9ea5f..77b4336538e 100644 --- a/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp +++ b/libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp @@ -168,9 +168,6 @@ int main() catch (std::ios_base::failure&) { } -#else - ios1.copyfmt(ios2); -#endif assert(ios1.rdstate() == std::ios::eofbit); assert(ios1.rdbuf() == &sb1); assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase)); @@ -193,4 +190,5 @@ int main() assert(ios1.pword(1) == &d2); assert(ios1.tie() == (std::ostream*)2); assert(ios1.fill() == '2'); +#endif } diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp index 88624581df9..c1f3e55759a 100644 --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.cons.des/copy.pass.cpp @@ -23,4 +23,5 @@ int main() std::ostream_iterator<int> i(outf); std::ostream_iterator<int> j = i; assert(outf.good()); + ((void)j); } diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp index 71130a8dbc6..c88e5b06e67 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp @@ -48,7 +48,7 @@ void operator delete(void* p, const std::nothrow_t&) TEST_NOEXCEPT std::free(p); } -void operator delete [] (void* p, std::align_val_t a) TEST_NOEXCEPT +void operator delete [] (void* p, std::align_val_t) TEST_NOEXCEPT { ++aligned_delete_called; std::free(p); diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp index 8f8dfe32e5e..131deb340d2 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp @@ -55,7 +55,7 @@ void* operator new[](std::size_t s, std::align_val_t a) TEST_THROW_SPEC(std::bad return DummyData; } -void operator delete[](void* p, std::align_val_t a) TEST_NOEXCEPT +void operator delete[](void* p, std::align_val_t) TEST_NOEXCEPT { assert(new_called == 1); --new_called; diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp index 6bfdd0591a2..a5d4df34a85 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp @@ -49,7 +49,7 @@ void operator delete(void* p, const std::nothrow_t&) TEST_NOEXCEPT std::free(p); } -void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT +void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT { ++aligned_delete_called; std::free(p); diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp index 0366cf8999c..df3e4c1560a 100644 --- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp @@ -55,7 +55,7 @@ void* operator new(std::size_t s, std::align_val_t a) TEST_THROW_SPEC(std::bad_a return DummyData; } -void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT +void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT { assert(new_called == 1); --new_called; diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp index 9d512bd9d13..2b4a686cf3e 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp @@ -27,7 +27,6 @@ int main() { -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS typedef std::codecvt<char16_t, char, std::mbstate_t> F; static_assert((std::is_base_of<std::locale::facet, F>::value), ""); static_assert((std::is_base_of<std::codecvt_base, F>::value), ""); @@ -38,5 +37,5 @@ int main() assert(std::has_facet<F>(l)); const F& f = std::use_facet<F>(l); (void)F::id; -//#endif + ((void)f); } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp index 25f2b3d8df5..c76fea9af9f 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp @@ -27,7 +27,6 @@ int main() { -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS typedef std::codecvt<char32_t, char, std::mbstate_t> F; static_assert((std::is_base_of<std::locale::facet, F>::value), ""); static_assert((std::is_base_of<std::codecvt_base, F>::value), ""); @@ -38,5 +37,5 @@ int main() assert(std::has_facet<F>(l)); const F& f = std::use_facet<F>(l); (void)F::id; -//#endif + ((void)f); } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp index 6abf5cee328..aba76df0b9c 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp @@ -24,5 +24,6 @@ int main() { B b; std::mbstate_t s = b.state(); + ((void)s); } } diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp index 08dfa2558be..a7a816b37f9 100644 --- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp +++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp @@ -22,4 +22,5 @@ int main() typedef std::wstring_convert<Codecvt> Myconv; Myconv myconv; std::mbstate_t s = myconv.state(); + ((void)s); } diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp index e09163a7057..03ed727cab8 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp index 0fd9cf79bcb..a2c55390f2a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp index 58286904ae2..8eb72006a1a 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp @@ -34,7 +34,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp index 157246947cf..0d039a159e4 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp index 0752ea59f55..36a2962218d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp index aedeec8caac..74a3857e932 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp index e1b98ecd067..7ae59980b09 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp index 20f2e71b140..491f3fac573 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp index 041a7814d03..9f09ab5827d 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp @@ -36,7 +36,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp index 9a2276a8b75..8fa419c2179 100644 --- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp +++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp @@ -35,7 +35,6 @@ test() void test_edges() { typedef std::complex<double> C; - const double pi = std::atan2(+0., -0.); const unsigned N = sizeof(testcases) / sizeof(testcases[0]); for (unsigned i = 0; i < N; ++i) { diff --git a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp index 72275e01e1b..60b94ab5fc9 100644 --- a/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp @@ -45,7 +45,6 @@ int main() // Test return value of assignment. { int a1[] = {0, 1, 2}; - int a2[] = {3, 4, 3}; std::valarray<int> v1(a1, 3); std::slice_array<int> s1 = v1[std::slice(1, 1, 1)]; std::slice_array<int> s2 = v1[std::slice(0, 1, 1)]; diff --git a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp index 2fcdc973041..b2b55fdc3c4 100644 --- a/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp @@ -41,7 +41,6 @@ int main() typedef int T; T a1[] = {1, 2, 3, 4, 5}; const unsigned N1 = sizeof(a1)/sizeof(a1[0]); - const unsigned N2 = 0; std::valarray<T> v1(a1, N1); std::valarray<T> v2; std::valarray<T> v1_save = v1; @@ -57,7 +56,6 @@ int main() { typedef int T; T a2[] = {6, 7, 8, 9, 10, 11, 12}; - const unsigned N1 = 0; const unsigned N2 = sizeof(a2)/sizeof(a2[0]); std::valarray<T> v1; std::valarray<T> v2(a2, N2); @@ -73,8 +71,6 @@ int main() } { typedef int T; - const unsigned N1 = 0; - const unsigned N2 = 0; std::valarray<T> v1; std::valarray<T> v2; std::valarray<T> v1_save = v1; diff --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp index bd845ce6ef7..cb1807bf380 100644 --- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp @@ -43,7 +43,6 @@ int main() typedef int T; T a1[] = {1, 2, 3, 4, 5}; const unsigned N1 = sizeof(a1)/sizeof(a1[0]); - const unsigned N2 = 0; std::valarray<T> v1(a1, N1); std::valarray<T> v2; std::valarray<T> v1_save = v1; @@ -59,7 +58,6 @@ int main() { typedef int T; T a2[] = {6, 7, 8, 9, 10, 11, 12}; - const unsigned N1 = 0; const unsigned N2 = sizeof(a2)/sizeof(a2[0]); std::valarray<T> v1; std::valarray<T> v2(a2, N2); @@ -75,8 +73,6 @@ int main() } { typedef int T; - const unsigned N1 = 0; - const unsigned N2 = 0; std::valarray<T> v1; std::valarray<T> v2; std::valarray<T> v1_save = v1; diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp index cde9db4ba12..af065b84d1b 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp @@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index 3eb7b7df3a4..cd03d99ebf1 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out) template <typename Input1, typename Input2 = Input1> -constexpr bool do_test(int dummy = 0) +constexpr bool do_test(int = 0) { using S1 = typename std::make_signed<Input1>::type; using S2 = typename std::make_signed<Input2>::type; diff --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp index ff9285b28da..730576844a0 100644 --- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp @@ -49,6 +49,8 @@ void check_random_device_invalid(const std::string &token) { LIBCPP_ASSERT(false); } catch (const std::system_error&) { } +#else + ((void)token); #endif } diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp index 9e46c6e4360..de5b153e0d1 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp @@ -187,7 +187,7 @@ test4() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); + //double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -236,7 +236,7 @@ test5() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -389,7 +389,7 @@ test9() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -438,7 +438,7 @@ test10() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan @@ -487,7 +487,7 @@ test11() kurtosis += d2 * d2; } var /= u.size(); - double dev = std::sqrt(var); +// double dev = std::sqrt(var); // In this case: // skew computes to 0./0. == nan // kurtosis computes to 0./0. == nan diff --git a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp index d9aaec38e38..17503364e03 100644 --- a/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp @@ -193,8 +193,8 @@ test4() kurtosis -= 3; double x_mean = d.k() * (1 - d.p()) / d.p(); double x_var = x_mean / d.p(); - double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p())); - double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p())); +// double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p())); +// double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p())); assert(mean == x_mean); assert(var == x_var); } diff --git a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp index a32b2ca0ae3..f866929795d 100644 --- a/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp @@ -617,11 +617,12 @@ int main() } std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2)); */ { + /* std::cmatch m; const char s[] = "m"; - /* assert(std::regex_match(s, m,*/ std::regex("[a[=M=]z]"/*, - std::regex_constants::awk*/);//)); -/* assert(m.size() == 1); + assert(std::regex_match(s, m, std::regex("[a[=M=]z]", + std::regex_constants::awk); + assert(m.size() == 1); assert(!m.prefix().matched); assert(m.prefix().first == s); assert(m.prefix().second == m[0].first); diff --git a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp index d6fc7696fca..fa4e675c78f 100644 --- a/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp +++ b/libcxx/test/std/re/re.alg/re.alg.search/grep.pass.cpp @@ -37,6 +37,8 @@ extern "C" void LLVMFuzzerTestOneInput(const char *data) } catch (std::regex_error &) {} } +#else + ((void)data); #endif } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp index a4a0e294c26..a9eb6c961a3 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign3.pass.cpp @@ -18,7 +18,6 @@ int main() { - char s1[] = {1, 2, 3}; char s2[3] = {0}; assert(std::char_traits<char>::assign(s2, 3, char(5)) == s2); assert(s2[0] == char(5)); diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp index fc1ba6e8670..4b702fa8b40 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign3.pass.cpp @@ -19,7 +19,6 @@ int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - char16_t s1[] = {1, 2, 3}; char16_t s2[3] = {0}; assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2); assert(s2[0] == char16_t(5)); diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp index 0c31ea7ae97..8e0ee2f6ff9 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign3.pass.cpp @@ -19,7 +19,6 @@ int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - char32_t s1[] = {1, 2, 3}; char32_t s2[3] = {0}; assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2); assert(s2[0] == char32_t(5)); diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp index 2a00fe06e5a..acb50567172 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign3.pass.cpp @@ -18,7 +18,6 @@ int main() { - wchar_t s1[] = {1, 2, 3}; wchar_t s2[3] = {0}; assert(std::char_traits<wchar_t>::assign(s2, 3, wchar_t(5)) == s2); assert(s2[0] == wchar_t(5)); diff --git a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp index 5a5ff9df8fd..0f5ee05e9a0 100644 --- a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp @@ -72,7 +72,7 @@ std::unique_ptr<int> f4(std::unique_ptr<int>&& p) void f5(int j) { std::this_thread::sleep_for(ms(200)); - TEST_THROW(j); + TEST_THROW(j); ((void)j); } template <class Ret, class CheckLamdba, class ...Args> diff --git a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp index aad6370b0f8..1cdeadf8495 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp @@ -22,7 +22,6 @@ void func(std::promise<int> p) { - const int i = 5; p.set_exception_at_thread_exit(std::make_exception_ptr(3)); } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp index 99f94b1eb38..07eeaaa46af 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp @@ -31,7 +31,7 @@ public: long operator()(long i, long j) const {return data_ + i + j;} }; -void func(std::packaged_task<double(int, char)> p) +void func(std::packaged_task<double(int, char)>) { } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp index 380f84cbb3c..a597c9d8304 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp @@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int, char)> p) { assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied)); } +#else + ((void)p); #endif } @@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int, char)> p) { assert(e.code() == make_error_code(std::future_errc::no_state)); } +#else + ((void)p); #endif } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp index b2d1ee0ddc0..6acf8c5a619 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp @@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int, char)> p) { assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied)); } +#else + ((void)p); #endif } @@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int, char)> p) { assert(e.code() == make_error_code(std::future_errc::no_state)); } +#else + ((void)p); #endif } diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp index b2403079275..d7066f4bff4 100644 --- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp +++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp @@ -45,7 +45,7 @@ int test2 = 0; int runs = 0; -void f() +void f(bool expect_result) { typedef std::chrono::system_clock Clock; typedef std::chrono::milliseconds milliseconds; @@ -54,7 +54,8 @@ void f() test1 = 1; cv.notify_one(); Clock::time_point t0 = Clock::now(); - bool r = cv.wait_for(lk, milliseconds(250), Pred(test2)); + bool result = cv.wait_for(lk, milliseconds(250), Pred(test2)); + assert(result == expect_result); Clock::time_point t1 = Clock::now(); if (runs == 0) { @@ -73,7 +74,7 @@ int main() { { L1 lk(m0); - std::thread t(f); + std::thread t(f, /*expect_result*/true); assert(test1 == 0); while (test1 == 0) cv.wait(lk); @@ -87,7 +88,7 @@ int main() test2 = 0; { L1 lk(m0); - std::thread t(f); + std::thread t(f, /*expect_result*/false); assert(test1 == 0); while (test1 == 0) cv.wait(lk); diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp index 64df0680b0b..5baaee533a6 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/types.pass.cpp @@ -28,7 +28,7 @@ int main() typedef std::try_to_lock_t T2; typedef std::adopt_lock_t T3; - T1 t1 = std::defer_lock; - T2 t2 = std::try_to_lock; - T3 t3 = std::adopt_lock; + T1 t1 = std::defer_lock; ((void)t1); + T2 t2 = std::try_to_lock; ((void)t2); + T3 t3 = std::adopt_lock; ((void)t3); } diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp index 6c31df593c0..e452ac98c49 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp @@ -58,7 +58,6 @@ int main() { G g; std::thread t0(g, 5, 5.5); - std::thread::id id = t0.get_id(); std::thread t1; t0 = std::move(t1); assert(false); diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp index 5cca7b0b66b..f9f38c85f0e 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp @@ -50,7 +50,8 @@ int main() std::thread::id id0 = t0.get_id(); std::thread t1; std::thread::id id1 = t1.get_id(); - assert(t0.get_id() != id1); + assert(t0.get_id() == id0); + assert(id0 != id1); assert(t1.get_id() == std::thread::id()); t0.join(); } diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp index eb31a208f5e..af081ecceef 100644 --- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp +++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp @@ -103,6 +103,8 @@ void checkThrows(any& a) } catch (...) { assert(false); } +#else + ((void)a); #endif } diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp index a0c686de77b..180433109f2 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp @@ -29,7 +29,7 @@ struct DummyUnaryFunction struct BadUnaryFunction { template <typename S> - constexpr int operator()(S const & s) const + constexpr int operator()(S const &) const { // Trigger a compile error if this function is instantiated. // The constexpr is needed so that it is instantiated while checking diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp index 68986ac1aeb..c1f2899f153 100644 --- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp @@ -56,8 +56,32 @@ constexpr decltype(std::placeholders::_9) cp9 = std::placeholders::_9; constexpr decltype(std::placeholders::_10) cp10 = std::placeholders::_10; #endif // TEST_STD_VER >= 11 +void use_placeholders_to_prevent_unused_warning() { + ((void)cp1); + ((void)cp2); + ((void)cp3); + ((void)cp4); + ((void)cp5); + ((void)cp6); + ((void)cp7); + ((void)cp8); + ((void)cp9); + ((void)cp10); + ((void)default1); + ((void)default2); + ((void)default3); + ((void)default4); + ((void)default5); + ((void)default6); + ((void)default7); + ((void)default8); + ((void)default9); + ((void)default10); +} + int main() { + use_placeholders_to_prevent_unused_warning(); test(std::placeholders::_1); test(std::placeholders::_2); test(std::placeholders::_3); diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index f104385f08b..47a3e1cc596 100644 --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -138,26 +138,26 @@ inline constexpr CallType operator|(CallType LHS, CallType RHS) { struct ForwardingCallObject { template <class ...Args> - bool operator()(Args&&... args) & { + bool operator()(Args&&...) & { set_call<Args&&...>(CT_NonConst | CT_LValue); return true; } template <class ...Args> - bool operator()(Args&&... args) const & { + bool operator()(Args&&...) const & { set_call<Args&&...>(CT_Const | CT_LValue); return true; } // Don't allow the call operator to be invoked as an rvalue. template <class ...Args> - bool operator()(Args&&... args) && { + bool operator()(Args&&...) && { set_call<Args&&...>(CT_NonConst | CT_RValue); return true; } template <class ...Args> - bool operator()(Args&&... args) const && { + bool operator()(Args&&...) const && { set_call<Args&&...>(CT_Const | CT_RValue); return true; } @@ -526,7 +526,6 @@ void call_operator_forwarding_test() assert(Fn::check_call<int&&>(CT_Const | CT_RValue)); } { // test multi arg - int x = 42; const double y = 3.14; std::string s = "abc"; obj(42, std::move(y), s, std::string{"foo"}); diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp index a611b1a12f0..2949d6310c5 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/unique.ptr.dltr.dflt1/convert_ctor.pass.cpp @@ -24,4 +24,5 @@ int main() { std::default_delete<int[]> d1; std::default_delete<const int[]> d2 = d1; + ((void)d2); } diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp index 5720d3bd288..89b6fa24884 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/move02.pass.cpp @@ -38,7 +38,7 @@ source1() return std::unique_ptr<A[]>(new A[3]); } -void sink1(std::unique_ptr<A[]> p) +void sink1(std::unique_ptr<A[]>) { } @@ -48,7 +48,7 @@ source2() return std::unique_ptr<A[], Deleter<A[]> >(new A[3]); } -void sink2(std::unique_ptr<A[], Deleter<A[]> > p) +void sink2(std::unique_ptr<A[], Deleter<A[]> >) { } @@ -59,7 +59,7 @@ source3() return std::unique_ptr<A[], NCDeleter<A[]>&>(new A[3], d); } -void sink3(std::unique_ptr<A[], NCDeleter<A[]>&> p) +void sink3(std::unique_ptr<A[], NCDeleter<A[]>&>) { } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp index 68111c0c13b..c4d4763a6f0 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp @@ -87,6 +87,7 @@ void test_implicit() using T = ImplicitThrow; optional<T> t = 42; assert(false); + ((void)t); } catch (int) { } } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp index ed3cafadbf0..a5b3d4415e3 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp @@ -91,6 +91,8 @@ int main() { } { std::tuple<A&&> t(std::forward_as_tuple(A{})); + ((void)t); std::tuple<ExplicitA&&> t2(std::forward_as_tuple(ExplicitA{})); + ((void)t2); } } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp index 30e020e8f0b..dd9b832423a 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp @@ -47,30 +47,30 @@ struct ExplicitDerived : std::tuple<T> { int main() { { - std::tuple<Explicit> foo = Derived<int>{42}; + std::tuple<Explicit> foo = Derived<int>{42}; ((void)foo); assert(count == 1); - std::tuple<Explicit> bar(Derived<int>{42}); + std::tuple<Explicit> bar(Derived<int>{42}); ((void)bar); assert(count == 2); } count = 0; { - std::tuple<Implicit> foo = Derived<int>{42}; + std::tuple<Implicit> foo = Derived<int>{42}; ((void)foo); assert(count == 1); - std::tuple<Implicit> bar(Derived<int>{42}); + std::tuple<Implicit> bar(Derived<int>{42}); ((void)bar); assert(count == 2); } count = 0; { static_assert(!std::is_convertible< ExplicitDerived<int>, std::tuple<Explicit>>::value, ""); - std::tuple<Explicit> bar(ExplicitDerived<int>{42}); + std::tuple<Explicit> bar(ExplicitDerived<int>{42}); ((void)bar); assert(count == 1); } count = 0; { // FIXME: Libc++ incorrectly rejects this code. #ifndef _LIBCPP_VERSION - std::tuple<Implicit> foo = ExplicitDerived<int>{42}; + std::tuple<Implicit> foo = ExplicitDerived<int>{42}; ((void)foo); static_assert(std::is_convertible< ExplicitDerived<int>, std::tuple<Implicit>>::value, "correct STLs accept this"); @@ -80,7 +80,7 @@ int main() { "libc++ incorrectly rejects this"); #endif assert(count == 0); - std::tuple<Implicit> bar(ExplicitDerived<int>{42}); + std::tuple<Implicit> bar(ExplicitDerived<int>{42}); ((void)bar); assert(count == 1); } count = 0; diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp index 999a9ff1199..0da132fcfc2 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp @@ -82,6 +82,7 @@ int main() { // check that the literal '0' can implicitly initialize a stored pointer. std::tuple<int*> t = 0; + assert(std::get<0>(t) == nullptr); } { std::tuple<int> t(2); diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp index 0c93673532b..1cc13cf58ba 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp @@ -29,7 +29,7 @@ struct ConstructsWithTupleLeaf ConstructsWithTupleLeaf(ConstructsWithTupleLeaf &&) {} template <class T> - ConstructsWithTupleLeaf(T t) { + ConstructsWithTupleLeaf(T) { static_assert(!std::is_same<T, T>::value, "Constructor instantiated for type other than int"); } diff --git a/libcxx/test/support/container_test_types.h b/libcxx/test/support/container_test_types.h index 0b97f2e94e7..c17ce913948 100644 --- a/libcxx/test/support/container_test_types.h +++ b/libcxx/test/support/container_test_types.h @@ -371,7 +371,7 @@ struct CopyInsertable { template <class ...Args> - CopyInsertable(Args&&... args) { + CopyInsertable(Args&&...) { assert(false); } diff --git a/libcxx/test/support/controlled_allocators.hpp b/libcxx/test/support/controlled_allocators.hpp index 878b7455a5a..280aaa564c6 100644 --- a/libcxx/test/support/controlled_allocators.hpp +++ b/libcxx/test/support/controlled_allocators.hpp @@ -117,7 +117,7 @@ struct AllocController { } template <class ...Args, class Alloc, class Tp> - void countConstruct(Alloc const& a, Tp *p) { + void countConstruct(Alloc const&, Tp *p) { ++construct_called; last_construct_pointer = p; last_construct_alloc = &makeTypeID<Alloc>(); @@ -126,7 +126,7 @@ struct AllocController { } template <class Alloc, class Tp> - void countDestroy(Alloc const& a, Tp *p) { + void countDestroy(Alloc const&, Tp *p) { ++destroy_called; last_destroy_alloc = &makeTypeID<Alloc>(); last_destroy_type = &makeTypeID<Tp>(); @@ -263,7 +263,7 @@ public: template <class U, class ...Args> void construct(U *p, Args&&... args) { - auto *c = ::new ((void*)p) U(std::forward<Args>(args)...); + ::new ((void*)p) U(std::forward<Args>(args)...); P->countConstruct<Args&&...>(*this, p); } diff --git a/libcxx/test/support/filesystem_test_helper.hpp b/libcxx/test/support/filesystem_test_helper.hpp index 7150f79739b..c2e41fca09c 100644 --- a/libcxx/test/support/filesystem_test_helper.hpp +++ b/libcxx/test/support/filesystem_test_helper.hpp @@ -230,6 +230,7 @@ private: // check that the fs test root in the enviroment matches what we were // compiled with. static bool checked = checkDynamicTestRoot(); + ((void)checked); std::string cmd = LIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER; cmd += " \"" + raw_cmd + "\""; int ret = std::system(cmd.c_str()); diff --git a/libcxx/test/support/nasty_containers.hpp b/libcxx/test/support/nasty_containers.hpp index 79f6ddfb0e2..dcad6c259ff 100644 --- a/libcxx/test/support/nasty_containers.hpp +++ b/libcxx/test/support/nasty_containers.hpp @@ -245,8 +245,8 @@ public: iterator erase(const_iterator pos) { return l_.erase(pos); } iterator erase(const_iterator pos, const_iterator last) { return l_.erase(pos, last); } - void resize(size_type sz) { l_.resize(); } - void resize(size_type sz, const value_type& c) { l_.resize(c); } + void resize(size_type) { l_.resize(); } + void resize(size_type, const value_type& c) { l_.resize(c); } void swap(nasty_list &nl) #if TEST_STD_VER > 14 diff --git a/libcxx/test/support/uses_alloc_types.hpp b/libcxx/test/support/uses_alloc_types.hpp index 6338ca41109..8422f809ba7 100644 --- a/libcxx/test/support/uses_alloc_types.hpp +++ b/libcxx/test/support/uses_alloc_types.hpp @@ -281,7 +281,7 @@ public: : Base(&makeArgumentID<UsesAllocatorV1 &&>()) {} // Non-Uses Allocator Ctor template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false> - UsesAllocatorV1(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {} + UsesAllocatorV1(Args&&...) : Base(&makeArgumentID<Args&&...>()) {} // Uses Allocator Arg Ctor template <class ...Args> @@ -290,10 +290,10 @@ public: { } // BLOWS UP: Uses Allocator Last Ctor - template <class _First, class ...Args, EnableIfB<sizeof...(Args) == Arity> _Dummy = false> - constexpr UsesAllocatorV1(_First&& __first, Args&&... args) + template <class First, class ...Args, EnableIfB<sizeof...(Args) == Arity> Dummy = false> + constexpr UsesAllocatorV1(First&&, Args&&...) { - static_assert(!std::is_same<_First, _First>::value, ""); + static_assert(!std::is_same<First, First>::value, ""); } }; @@ -315,7 +315,7 @@ public: // Non-Uses Allocator Ctor template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false> - UsesAllocatorV2(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {} + UsesAllocatorV2(Args&&...) : Base(&makeArgumentID<Args&&...>()) {} // Uses Allocator Last Ctor template <class ...Args, EnableIfB<sizeof...(Args) == Arity + 1> = false> @@ -341,7 +341,7 @@ public: // Non-Uses Allocator Ctor template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false> - UsesAllocatorV3(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {} + UsesAllocatorV3(Args&&...) : Base(&makeArgumentID<Args&&...>()) {} // Uses Allocator Arg Ctor template <class ...Args> @@ -372,7 +372,7 @@ public: : Base(&makeArgumentID<NotUsesAllocator &&>()) {} // Non-Uses Allocator Ctor template <class ...Args, EnableIfB<sizeof...(Args) == Arity> = false> - NotUsesAllocator(Args&&... args) : Base(&makeArgumentID<Args&&...>()) {} + NotUsesAllocator(Args&&...) : Base(&makeArgumentID<Args&&...>()) {} // Uses Allocator Arg Ctor template <class ...Args> |