[libcxx] r286847 - [libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is initialized but not referenced".
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 14 09:35:15 PST 2016
Author: stl_msft
Date: Mon Nov 14 11:35:14 2016
New Revision: 286847
URL: http://llvm.org/viewvc/llvm-project?rev=286847&view=rev
Log:
[libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is initialized but not referenced".
test/std/depr/depr.c.headers/inttypes_h.pass.cpp
test/std/input.output/file.streams/c.files/cinttypes.pass.cpp
test/std/input.output/iostream.forward/iosfwd.pass.cpp
Add test() to avoid a bunch of void-casts, although we still need a few.
test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp
skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below).
test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
test/std/localization/locales/locale.global.templates/use_facet.pass.cpp
When retrieving facets, the references are unused.
test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
"std::ios_base::iostate err = ios.goodbit;" was completely unused here.
test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
test/std/numerics/c.math/ctgmath.pass.cpp
test/std/numerics/rand/rand.device/entropy.pass.cpp
test/std/numerics/rand/rand.device/eval.pass.cpp
test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp
test/std/thread/futures/futures.promise/dtor.pass.cpp
test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
These variables are verifying types but are otherwise unused.
test/std/strings/basic.string/string.capacity/reserve.pass.cpp
old_cap was unused (it's unclear to me whether it was intended to be used).
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp
These tests contained unused characters.
Modified:
libcxx/trunk/test/std/depr/depr.c.headers/inttypes_h.pass.cpp
libcxx/trunk/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp
libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp
libcxx/trunk/test/std/input.output/iostream.forward/iosfwd.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
libcxx/trunk/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp
libcxx/trunk/test/std/numerics/c.math/ctgmath.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.device/entropy.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp
libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
Modified: libcxx/trunk/test/std/depr/depr.c.headers/inttypes_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/inttypes_h.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.c.headers/inttypes_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/inttypes_h.pass.cpp Mon Nov 14 11:35:14 2016
@@ -872,54 +872,56 @@
#error SCNxPTR not defined
#endif
+template <class T> void test()
+{
+ T t = 0;
+ ((void)t); // Prevent unused warning
+}
+
int main()
{
- {
- int8_t i1 = 0;
- int16_t i2 = 0;
- int32_t i3 = 0;
- int64_t i4 = 0;
- }
- {
- uint8_t i1 = 0;
- uint16_t i2 = 0;
- uint32_t i3 = 0;
- uint64_t i4 = 0;
- }
- {
- int_least8_t i1 = 0;
- int_least16_t i2 = 0;
- int_least32_t i3 = 0;
- int_least64_t i4 = 0;
- }
- {
- uint_least8_t i1 = 0;
- uint_least16_t i2 = 0;
- uint_least32_t i3 = 0;
- uint_least64_t i4 = 0;
- }
- {
- int_fast8_t i1 = 0;
- int_fast16_t i2 = 0;
- int_fast32_t i3 = 0;
- int_fast64_t i4 = 0;
- }
- {
- uint_fast8_t i1 = 0;
- uint_fast16_t i2 = 0;
- uint_fast32_t i3 = 0;
- uint_fast64_t i4 = 0;
- }
- {
- intptr_t i1 = 0;
- uintptr_t i2 = 0;
- intmax_t i3 = 0;
- uintmax_t i4 = 0;
- }
+ test<int8_t >();
+ test<int16_t>();
+ test<int32_t>();
+ test<int64_t>();
+
+ test<uint8_t >();
+ test<uint16_t>();
+ test<uint32_t>();
+ test<uint64_t>();
+
+ test<int_least8_t >();
+ test<int_least16_t>();
+ test<int_least32_t>();
+ test<int_least64_t>();
+
+ test<uint_least8_t >();
+ test<uint_least16_t>();
+ test<uint_least32_t>();
+ test<uint_least64_t>();
+
+ test<int_fast8_t >();
+ test<int_fast16_t>();
+ test<int_fast32_t>();
+ test<int_fast64_t>();
+
+ test<uint_fast8_t >();
+ test<uint_fast16_t>();
+ test<uint_fast32_t>();
+ test<uint_fast64_t>();
+
+ test<intptr_t >();
+ test<uintptr_t>();
+ test<intmax_t >();
+ test<uintmax_t>();
+
{
imaxdiv_t i1 = {};
+ ((void)i1); // Prevent unused warning
}
+
intmax_t i = 0;
+ ((void)i); // Prevent unused warning
static_assert((std::is_same<decltype(imaxabs(i)), intmax_t>::value), "");
static_assert((std::is_same<decltype(imaxdiv(i, i)), imaxdiv_t>::value), "");
static_assert((std::is_same<decltype(strtoimax("", (char**)0, 0)), intmax_t>::value), "");
Modified: libcxx/trunk/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/file.streams/c.files/cinttypes.pass.cpp Mon Nov 14 11:35:14 2016
@@ -872,54 +872,56 @@
#error SCNxPTR not defined
#endif
+template <class T> void test()
+{
+ T t = 0;
+ ((void)t); // Prevent unused warning
+}
+
int main()
{
- {
- std::int8_t i1 = 0;
- std::int16_t i2 = 0;
- std::int32_t i3 = 0;
- std::int64_t i4 = 0;
- }
- {
- std::uint8_t i1 = 0;
- std::uint16_t i2 = 0;
- std::uint32_t i3 = 0;
- std::uint64_t i4 = 0;
- }
- {
- std::int_least8_t i1 = 0;
- std::int_least16_t i2 = 0;
- std::int_least32_t i3 = 0;
- std::int_least64_t i4 = 0;
- }
- {
- std::uint_least8_t i1 = 0;
- std::uint_least16_t i2 = 0;
- std::uint_least32_t i3 = 0;
- std::uint_least64_t i4 = 0;
- }
- {
- std::int_fast8_t i1 = 0;
- std::int_fast16_t i2 = 0;
- std::int_fast32_t i3 = 0;
- std::int_fast64_t i4 = 0;
- }
- {
- std::uint_fast8_t i1 = 0;
- std::uint_fast16_t i2 = 0;
- std::uint_fast32_t i3 = 0;
- std::uint_fast64_t i4 = 0;
- }
- {
- std::intptr_t i1 = 0;
- std::uintptr_t i2 = 0;
- std::intmax_t i3 = 0;
- std::uintmax_t i4 = 0;
- }
+ test<std::int8_t >();
+ test<std::int16_t>();
+ test<std::int32_t>();
+ test<std::int64_t>();
+
+ test<std::uint8_t >();
+ test<std::uint16_t>();
+ test<std::uint32_t>();
+ test<std::uint64_t>();
+
+ test<std::int_least8_t >();
+ test<std::int_least16_t>();
+ test<std::int_least32_t>();
+ test<std::int_least64_t>();
+
+ test<std::uint_least8_t >();
+ test<std::uint_least16_t>();
+ test<std::uint_least32_t>();
+ test<std::uint_least64_t>();
+
+ test<std::int_fast8_t >();
+ test<std::int_fast16_t>();
+ test<std::int_fast32_t>();
+ test<std::int_fast64_t>();
+
+ test<std::uint_fast8_t >();
+ test<std::uint_fast16_t>();
+ test<std::uint_fast32_t>();
+ test<std::uint_fast64_t>();
+
+ test<std::intptr_t >();
+ test<std::uintptr_t>();
+ test<std::intmax_t >();
+ test<std::uintmax_t>();
+
{
std::imaxdiv_t i1 = {};
+ ((void)i1); // Prevent unused warning
}
+
std::intmax_t i = 0;
+ ((void)i); // Prevent unused warning
static_assert((std::is_same<decltype(std::imaxabs(i)), std::intmax_t>::value), "");
static_assert((std::is_same<decltype(std::imaxdiv(i, i)), std::imaxdiv_t>::value), "");
static_assert((std::is_same<decltype(std::strtoimax("", (char**)0, 0)), std::intmax_t>::value), "");
Modified: libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp Mon Nov 14 11:35:14 2016
@@ -32,6 +32,7 @@ void both_ways ( const CharT *p ) {
std::basic_stringstream<CharT, Traits> ss;
bool skippingws = is_skipws ( ss );
+ ((void)skippingws); // Prevent unused warning
ss << q;
ss >> q;
}
Modified: libcxx/trunk/test/std/input.output/iostream.forward/iosfwd.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.forward/iosfwd.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.forward/iosfwd.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.forward/iosfwd.pass.cpp Mon Nov 14 11:35:14 2016
@@ -12,131 +12,112 @@
#include <iosfwd>
#include <cwchar> // for mbstate_t
+template <class Ptr> void test()
+{
+ Ptr p = 0;
+ ((void)p); // Prevent unused warning
+}
+
int main()
{
- {
- std::char_traits<char>* t1 = 0;
- std::char_traits<wchar_t>* t2 = 0;
- std::char_traits<unsigned short>* t3 = 0;
- }
- {
- std::basic_ios<char>* t1 = 0;
- std::basic_ios<wchar_t>* t2 = 0;
- std::basic_ios<unsigned short>* t3 = 0;
- }
- {
- std::basic_streambuf<char>* t1 = 0;
- std::basic_streambuf<wchar_t>* t2 = 0;
- std::basic_streambuf<unsigned short>* t3 = 0;
- }
- {
- std::basic_istream<char>* t1 = 0;
- std::basic_istream<wchar_t>* t2 = 0;
- std::basic_istream<unsigned short>* t3 = 0;
- }
- {
- std::basic_ostream<char>* t1 = 0;
- std::basic_ostream<wchar_t>* t2 = 0;
- std::basic_ostream<unsigned short>* t3 = 0;
- }
- {
- std::basic_iostream<char>* t1 = 0;
- std::basic_iostream<wchar_t>* t2 = 0;
- std::basic_iostream<unsigned short>* t3 = 0;
- }
- {
- std::basic_stringbuf<char>* t1 = 0;
- std::basic_stringbuf<wchar_t>* t2 = 0;
- std::basic_stringbuf<unsigned short>* t3 = 0;
- }
- {
- std::basic_istringstream<char>* t1 = 0;
- std::basic_istringstream<wchar_t>* t2 = 0;
- std::basic_istringstream<unsigned short>* t3 = 0;
- }
- {
- std::basic_ostringstream<char>* t1 = 0;
- std::basic_ostringstream<wchar_t>* t2 = 0;
- std::basic_ostringstream<unsigned short>* t3 = 0;
- }
- {
- std::basic_stringstream<char>* t1 = 0;
- std::basic_stringstream<wchar_t>* t2 = 0;
- std::basic_stringstream<unsigned short>* t3 = 0;
- }
- {
- std::basic_filebuf<char>* t1 = 0;
- std::basic_filebuf<wchar_t>* t2 = 0;
- std::basic_filebuf<unsigned short>* t3 = 0;
- }
- {
- std::basic_ifstream<char>* t1 = 0;
- std::basic_ifstream<wchar_t>* t2 = 0;
- std::basic_ifstream<unsigned short>* t3 = 0;
- }
- {
- std::basic_ofstream<char>* t1 = 0;
- std::basic_ofstream<wchar_t>* t2 = 0;
- std::basic_ofstream<unsigned short>* t3 = 0;
- }
- {
- std::basic_fstream<char>* t1 = 0;
- std::basic_fstream<wchar_t>* t2 = 0;
- std::basic_fstream<unsigned short>* t3 = 0;
- }
- {
- std::istreambuf_iterator<char>* t1 = 0;
- std::istreambuf_iterator<wchar_t>* t2 = 0;
- std::istreambuf_iterator<unsigned short>* t3 = 0;
- }
- {
- std::ostreambuf_iterator<char>* t1 = 0;
- std::ostreambuf_iterator<wchar_t>* t2 = 0;
- std::ostreambuf_iterator<unsigned short>* t3 = 0;
- }
- {
- std::ios* t1 = 0;
- std::wios* t2 = 0;
- }
- {
- std::streambuf* t1 = 0;
- std::istream* t2 = 0;
- std::ostream* t3 = 0;
- std::iostream* t4 = 0;
- }
- {
- std::stringbuf* t1 = 0;
- std::istringstream* t2 = 0;
- std::ostringstream* t3 = 0;
- std::stringstream* t4 = 0;
- }
- {
- std::filebuf* t1 = 0;
- std::ifstream* t2 = 0;
- std::ofstream* t3 = 0;
- std::fstream* t4 = 0;
- }
- {
- std::wstreambuf* t1 = 0;
- std::wistream* t2 = 0;
- std::wostream* t3 = 0;
- std::wiostream* t4 = 0;
- }
- {
- std::wstringbuf* t1 = 0;
- std::wistringstream* t2 = 0;
- std::wostringstream* t3 = 0;
- std::wstringstream* t4 = 0;
- }
- {
- std::wfilebuf* t1 = 0;
- std::wifstream* t2 = 0;
- std::wofstream* t3 = 0;
- std::wfstream* t4 = 0;
- }
- {
- std::fpos<std::mbstate_t>* t1 = 0;
- std::streampos* t2 = 0;
- std::wstreampos* t3 = 0;
- }
+ test<std::char_traits<char>* >();
+ test<std::char_traits<wchar_t>* >();
+ test<std::char_traits<unsigned short>*>();
+
+ test<std::basic_ios<char>* >();
+ test<std::basic_ios<wchar_t>* >();
+ test<std::basic_ios<unsigned short>*>();
+
+ test<std::basic_streambuf<char>* >();
+ test<std::basic_streambuf<wchar_t>* >();
+ test<std::basic_streambuf<unsigned short>*>();
+
+ test<std::basic_istream<char>* >();
+ test<std::basic_istream<wchar_t>* >();
+ test<std::basic_istream<unsigned short>*>();
+
+ test<std::basic_ostream<char>* >();
+ test<std::basic_ostream<wchar_t>* >();
+ test<std::basic_ostream<unsigned short>*>();
+
+ test<std::basic_iostream<char>* >();
+ test<std::basic_iostream<wchar_t>* >();
+ test<std::basic_iostream<unsigned short>*>();
+
+ test<std::basic_stringbuf<char>* >();
+ test<std::basic_stringbuf<wchar_t>* >();
+ test<std::basic_stringbuf<unsigned short>*>();
+
+ test<std::basic_istringstream<char>* >();
+ test<std::basic_istringstream<wchar_t>* >();
+ test<std::basic_istringstream<unsigned short>*>();
+
+ test<std::basic_ostringstream<char>* >();
+ test<std::basic_ostringstream<wchar_t>* >();
+ test<std::basic_ostringstream<unsigned short>*>();
+
+ test<std::basic_stringstream<char>* >();
+ test<std::basic_stringstream<wchar_t>* >();
+ test<std::basic_stringstream<unsigned short>*>();
+
+ test<std::basic_filebuf<char>* >();
+ test<std::basic_filebuf<wchar_t>* >();
+ test<std::basic_filebuf<unsigned short>*>();
+
+ test<std::basic_ifstream<char>* >();
+ test<std::basic_ifstream<wchar_t>* >();
+ test<std::basic_ifstream<unsigned short>*>();
+
+ test<std::basic_ofstream<char>* >();
+ test<std::basic_ofstream<wchar_t>* >();
+ test<std::basic_ofstream<unsigned short>*>();
+
+ test<std::basic_fstream<char>* >();
+ test<std::basic_fstream<wchar_t>* >();
+ test<std::basic_fstream<unsigned short>*>();
+
+ test<std::istreambuf_iterator<char>* >();
+ test<std::istreambuf_iterator<wchar_t>* >();
+ test<std::istreambuf_iterator<unsigned short>*>();
+
+ test<std::ostreambuf_iterator<char>* >();
+ test<std::ostreambuf_iterator<wchar_t>* >();
+ test<std::ostreambuf_iterator<unsigned short>*>();
+
+ test<std::ios* >();
+ test<std::wios*>();
+
+ test<std::streambuf*>();
+ test<std::istream* >();
+ test<std::ostream* >();
+ test<std::iostream* >();
+
+ test<std::stringbuf* >();
+ test<std::istringstream*>();
+ test<std::ostringstream*>();
+ test<std::stringstream* >();
+
+ test<std::filebuf* >();
+ test<std::ifstream*>();
+ test<std::ofstream*>();
+ test<std::fstream* >();
+
+ test<std::wstreambuf*>();
+ test<std::wistream* >();
+ test<std::wostream* >();
+ test<std::wiostream* >();
+
+ test<std::wstringbuf* >();
+ test<std::wistringstream*>();
+ test<std::wostringstream*>();
+ test<std::wstringstream* >();
+
+ test<std::wfilebuf* >();
+ test<std::wifstream*>();
+ test<std::wofstream*>();
+ test<std::wfstream* >();
+
+ test<std::fpos<std::mbstate_t>*>();
+ test<std::streampos* >();
+ test<std::wstreampos* >();
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp Mon Nov 14 11:35:14 2016
@@ -29,6 +29,7 @@ int main()
{
assert(std::has_facet<std::collate<char> >(l));
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::collate<char>::id;
}
@@ -39,6 +40,7 @@ int main()
{
assert(std::has_facet<std::collate<wchar_t> >(l));
const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::collate<wchar_t>::id;
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp Mon Nov 14 11:35:14 2016
@@ -28,6 +28,7 @@ int main()
{
assert(std::has_facet<std::ctype<char> >(l));
const std::ctype<char>& f = std::use_facet<std::ctype<char> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::ctype<char>::id;
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp Mon Nov 14 11:35:14 2016
@@ -36,5 +36,6 @@ int main()
std::locale l = std::locale::classic();
assert(std::has_facet<F>(l));
const F& f = std::use_facet<F>(l);
+ ((void)f); // Prevent unused warning
(void)F::id;
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp Mon Nov 14 11:35:14 2016
@@ -36,5 +36,6 @@ int main()
std::locale l = std::locale::classic();
assert(std::has_facet<F>(l));
const F& f = std::use_facet<F>(l);
+ ((void)f); // Prevent unused warning
(void)F::id;
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp Mon Nov 14 11:35:14 2016
@@ -28,6 +28,7 @@ int main()
{
assert(std::has_facet<std::ctype<wchar_t> >(l));
const std::ctype<wchar_t>& f = std::use_facet<std::ctype<wchar_t> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::ctype<wchar_t>::id;
}
Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp Mon Nov 14 11:35:14 2016
@@ -47,7 +47,6 @@ int main()
std::ios ios(0);
long v = 0;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0");
@@ -56,7 +55,6 @@ int main()
std::ios ios(0);
long v = 1;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1");
@@ -65,7 +63,6 @@ int main()
std::ios ios(0);
long v = -1;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "-1");
@@ -74,7 +71,6 @@ int main()
std::ios ios(0);
long v = -1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "-1000");
@@ -83,7 +79,6 @@ int main()
std::ios ios(0);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1000");
@@ -93,7 +88,6 @@ int main()
showpos(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "+1000");
@@ -103,7 +97,6 @@ int main()
oct(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1750");
@@ -114,7 +107,6 @@ int main()
showbase(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "01750");
@@ -124,7 +116,6 @@ int main()
hex(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "3e8");
@@ -135,7 +126,6 @@ int main()
showbase(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x3e8");
@@ -147,7 +137,6 @@ int main()
uppercase(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0X3E8");
@@ -160,7 +149,6 @@ int main()
uppercase(ios);
long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0X3E_8");
@@ -172,7 +160,6 @@ int main()
showbase(ios);
long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x7f_fff_ff_f");
@@ -183,7 +170,6 @@ int main()
oct(ios);
long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "123_46_7");
@@ -195,7 +181,6 @@ int main()
showbase(ios);
long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0_123_46_7");
@@ -209,7 +194,6 @@ int main()
ios.width(15);
long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "*****0_123_46_7");
@@ -223,7 +207,6 @@ int main()
ios.width(15);
long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0_123_46_7*****");
@@ -237,7 +220,6 @@ int main()
ios.width(15);
long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "*****0_123_46_7");
@@ -252,7 +234,6 @@ int main()
ios.width(15);
long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "**0x7f_fff_ff_f");
@@ -266,7 +247,6 @@ int main()
ios.width(15);
long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x7f_fff_ff_f**");
@@ -280,7 +260,6 @@ int main()
ios.width(15);
long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x**7f_fff_ff_f");
@@ -294,7 +273,6 @@ int main()
right(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "***+1_00_0");
@@ -308,7 +286,6 @@ int main()
left(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "+1_00_0***");
@@ -322,7 +299,6 @@ int main()
internal(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "+***1_00_0");
@@ -336,7 +312,6 @@ int main()
showpos(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "***-1_00_0");
@@ -349,7 +324,6 @@ int main()
left(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "-1_00_0***");
@@ -362,7 +336,6 @@ int main()
internal(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "-***1_00_0");
Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp Mon Nov 14 11:35:14 2016
@@ -47,7 +47,6 @@ int main()
std::ios ios(0);
unsigned long v = 0;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0");
@@ -56,7 +55,6 @@ int main()
std::ios ios(0);
unsigned long v = 1;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1");
@@ -65,7 +63,6 @@ int main()
std::ios ios(0);
unsigned long v = -1;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == (sizeof(unsigned long) == 4 ? "4294967295" : "18446744073709551615"));
@@ -74,7 +71,6 @@ int main()
std::ios ios(0);
unsigned long v = -1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == (sizeof(unsigned long) == 4 ? "4294966296" : "18446744073709550616"));
@@ -83,7 +79,6 @@ int main()
std::ios ios(0);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1000");
@@ -93,7 +88,6 @@ int main()
showpos(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1000");
@@ -103,7 +97,6 @@ int main()
oct(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1750");
@@ -114,7 +107,6 @@ int main()
showbase(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "01750");
@@ -124,7 +116,6 @@ int main()
hex(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "3e8");
@@ -135,7 +126,6 @@ int main()
showbase(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x3e8");
@@ -147,7 +137,6 @@ int main()
uppercase(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0X3E8");
@@ -160,7 +149,6 @@ int main()
uppercase(ios);
unsigned long v = 1000;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0X3E_8");
@@ -172,7 +160,6 @@ int main()
showbase(ios);
unsigned long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x7f_fff_ff_f");
@@ -183,7 +170,6 @@ int main()
oct(ios);
unsigned long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "123_46_7");
@@ -195,7 +181,6 @@ int main()
showbase(ios);
unsigned long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0_123_46_7");
@@ -209,7 +194,6 @@ int main()
ios.width(15);
unsigned long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "*****0_123_46_7");
@@ -223,7 +207,6 @@ int main()
ios.width(15);
unsigned long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0_123_46_7*****");
@@ -237,7 +220,6 @@ int main()
ios.width(15);
unsigned long v = 0123467;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "*****0_123_46_7");
@@ -252,7 +234,6 @@ int main()
ios.width(15);
unsigned long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "**0x7f_fff_ff_f");
@@ -266,7 +247,6 @@ int main()
ios.width(15);
unsigned long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x7f_fff_ff_f**");
@@ -280,7 +260,6 @@ int main()
ios.width(15);
unsigned long v = 2147483647;
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "0x**7f_fff_ff_f");
@@ -294,7 +273,6 @@ int main()
right(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "****1_00_0");
@@ -308,7 +286,6 @@ int main()
left(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "1_00_0****");
@@ -322,7 +299,6 @@ int main()
internal(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == "****1_00_0");
@@ -336,7 +312,6 @@ int main()
showpos(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6"
@@ -350,7 +325,6 @@ int main()
left(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6"
@@ -364,7 +338,6 @@ int main()
internal(ios);
ios.width(10);
char str[50];
- std::ios_base::iostate err = ios.goodbit;
output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
std::string ex(str, iter.base());
assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6"
Modified: libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp Mon Nov 14 11:35:14 2016
@@ -21,6 +21,7 @@
int main()
{
std::time_base::dateorder d = std::time_base::no_order;
+ ((void)d); // Prevent unused warning
assert(std::time_base::no_order == 0);
assert(std::time_base::dmy == 1);
assert(std::time_base::mdy == 2);
Modified: libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp Mon Nov 14 11:35:14 2016
@@ -28,6 +28,7 @@ int main()
{
assert(std::has_facet<std::numpunct<char> >(l));
const std::numpunct<char>& f = std::use_facet<std::numpunct<char> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::numpunct<char>::id;
}
@@ -38,6 +39,7 @@ int main()
{
assert(std::has_facet<std::numpunct<wchar_t> >(l));
const std::numpunct<wchar_t>& f = std::use_facet<std::numpunct<wchar_t> >(l);
+ ((void)f); // Prevent unused warning
{
(void)std::numpunct<wchar_t>::id;
}
Modified: libcxx/trunk/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locales/locale.global.templates/use_facet.pass.cpp Mon Nov 14 11:35:14 2016
@@ -35,6 +35,7 @@ int main()
try
{
const my_facet& f = std::use_facet<my_facet>(std::locale());
+ ((void)f); // Prevent unused warning
assert(false);
}
catch (std::bad_cast&)
Modified: libcxx/trunk/test/std/numerics/c.math/ctgmath.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/c.math/ctgmath.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/c.math/ctgmath.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/c.math/ctgmath.pass.cpp Mon Nov 14 11:35:14 2016
@@ -15,4 +15,5 @@ int main()
{
std::complex<double> cd;
double x = std::sin(0);
+ ((void)x); // Prevent unused warning
}
Modified: libcxx/trunk/test/std/numerics/rand/rand.device/entropy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.device/entropy.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/entropy.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.device/entropy.pass.cpp Mon Nov 14 11:35:14 2016
@@ -20,4 +20,5 @@ int main()
{
std::random_device r;
double e = r.entropy();
+ ((void)e); // Prevent unused warning
}
Modified: libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.device/eval.pass.cpp Mon Nov 14 11:35:14 2016
@@ -23,6 +23,7 @@ int main()
{
std::random_device r;
std::random_device::result_type e = r();
+ ((void)e); // Prevent unused warning
}
#ifndef TEST_HAS_NO_EXCEPTIONS
Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp Mon Nov 14 11:35:14 2016
@@ -36,6 +36,7 @@ void
test(S s, typename S::size_type res_arg)
{
typename S::size_type old_cap = s.capacity();
+ ((void)old_cap); // Prevent unused warning
S s0 = s;
if (res_arg <= s.max_size())
{
Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp Mon Nov 14 11:35:14 2016
@@ -39,6 +39,7 @@ test(S str, typename S::value_type* s, t
try
{
typename S::size_type r = cs.copy(s, n, pos);
+ ((void)r); // Prevent unused warning
assert(false);
}
catch (std::out_of_range&)
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp Mon Nov 14 11:35:14 2016
@@ -18,7 +18,6 @@
int main()
{
- char c = '\0';
assert(std::char_traits<char>::eq('a', 'a'));
assert(!std::char_traits<char>::eq('a', 'A'));
}
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp Mon Nov 14 11:35:14 2016
@@ -20,5 +20,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
std::char_traits<char16_t>::int_type i = std::char_traits<char16_t>::eof();
+ ((void)i); // Prevent unused warning
#endif
}
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp Mon Nov 14 11:35:14 2016
@@ -22,7 +22,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#if TEST_STD_VER >= 11
- char16_t c = u'\0';
assert(std::char_traits<char16_t>::eq(u'a', u'a'));
assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
#endif
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp Mon Nov 14 11:35:14 2016
@@ -22,7 +22,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#if TEST_STD_VER >= 11
- char16_t c = u'\0';
assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
assert( std::char_traits<char16_t>::lt(u'A', u'a'));
#endif
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp Mon Nov 14 11:35:14 2016
@@ -20,5 +20,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
std::char_traits<char32_t>::int_type i = std::char_traits<char32_t>::eof();
+ ((void)i); // Prevent unused warning
#endif
}
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp Mon Nov 14 11:35:14 2016
@@ -22,7 +22,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#if TEST_STD_VER >= 11
- char32_t c = U'\0';
assert(std::char_traits<char32_t>::eq(U'a', U'a'));
assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
#endif
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp Mon Nov 14 11:35:14 2016
@@ -22,7 +22,6 @@ int main()
{
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#if TEST_STD_VER >= 11
- char32_t c = U'\0';
assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
assert( std::char_traits<char32_t>::lt(U'A', U'a'));
#endif
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp Mon Nov 14 11:35:14 2016
@@ -18,7 +18,6 @@
int main()
{
- wchar_t c = L'\0';
assert(std::char_traits<wchar_t>::eq(L'a', L'a'));
assert(!std::char_traits<wchar_t>::eq(L'a', L'A'));
}
Modified: libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp Mon Nov 14 11:35:14 2016
@@ -18,7 +18,6 @@
int main()
{
- wchar_t c = L'\0';
assert(!std::char_traits<wchar_t>::lt(L'a', L'a'));
assert( std::char_traits<wchar_t>::lt(L'A', L'a'));
}
Modified: libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.promise/dtor.pass.cpp Mon Nov 14 11:35:14 2016
@@ -44,6 +44,7 @@ int main()
try
{
T i = f.get();
+ ((void)i); // Prevent unused warning
assert(false);
}
catch (const std::future_error& e)
@@ -75,6 +76,7 @@ int main()
try
{
T i = f.get();
+ ((void)i); // Prevent unused warning
assert(false);
}
catch (const std::future_error& e)
Modified: libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp Mon Nov 14 11:35:14 2016
@@ -50,6 +50,7 @@ int main()
try
{
double i = f.get();
+ ((void)i); // Prevent unused warning
assert(false);
}
catch (const std::future_error& e)
Modified: libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp?rev=286847&r1=286846&r2=286847&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp Mon Nov 14 11:35:14 2016
@@ -52,6 +52,7 @@ void f()
cv.notify_one();
Clock::time_point t0 = Clock::now();
bool r = cv.wait_for(lk, milliseconds(250), Pred(test2));
+ ((void)r); // Prevent unused warning
Clock::time_point t1 = Clock::now();
if (runs == 0)
{
More information about the cfe-commits
mailing list