summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics
diff options
context:
space:
mode:
authorStephan T. Lavavej <stl@exchange.microsoft.com>2016-11-14 17:35:14 +0000
committerStephan T. Lavavej <stl@exchange.microsoft.com>2016-11-14 17:35:14 +0000
commit4dc0ed83905af9b48c94b640757c260781d60fd0 (patch)
treeb3c5bab49e9ce682c96bc462a5b463bf29180aec /libcxx/test/std/numerics
parent39f5e864e6b02cdeb20c4a12229e19e266bdd7be (diff)
downloadbcm5719-llvm-4dc0ed83905af9b48c94b640757c260781d60fd0.tar.gz
bcm5719-llvm-4dc0ed83905af9b48c94b640757c260781d60fd0.zip
[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. llvm-svn: 286847
Diffstat (limited to 'libcxx/test/std/numerics')
-rw-r--r--libcxx/test/std/numerics/c.math/ctgmath.pass.cpp1
-rw-r--r--libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp1
-rw-r--r--libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp b/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp
index 04a06280450..9e10690e3ca 100644
--- a/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/ctgmath.pass.cpp
@@ -15,4 +15,5 @@ int main()
{
std::complex<double> cd;
double x = std::sin(0);
+ ((void)x); // Prevent unused warning
}
diff --git a/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
index f01e5653391..141a84a6d9b 100644
--- a/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp
@@ -20,4 +20,5 @@ int main()
{
std::random_device r;
double e = r.entropy();
+ ((void)e); // Prevent unused warning
}
diff --git a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
index 6ecb04547e0..890f4caa31a 100644
--- a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -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
OpenPOWER on IntegriCloud