From c4a9db2f981a03aecf5e9a60e6d27a6dc6dac159 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 13 May 2017 00:29:50 +0300 Subject: Fix VC15 warnings (/W3) --- tests/manifest-parser/driver.cxx | 2 +- tests/manifest-serializer/driver.cxx | 2 +- tests/process/driver.cxx | 7 ++++++- tests/target-triplet/driver.cxx | 2 +- tests/timestamp/driver.cxx | 10 ++++++++-- 5 files changed, 17 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/manifest-parser/driver.cxx b/tests/manifest-parser/driver.cxx index 7642f4b..e480508 100644 --- a/tests/manifest-parser/driver.cxx +++ b/tests/manifest-parser/driver.cxx @@ -198,7 +198,7 @@ fail (const char* m) cerr << "nofail: " << r << endl; return false; } - catch (const manifest_parsing& e) + catch (const manifest_parsing&) { //cerr << e << endl; } diff --git a/tests/manifest-serializer/driver.cxx b/tests/manifest-serializer/driver.cxx index d148f12..3a8aef8 100644 --- a/tests/manifest-serializer/driver.cxx +++ b/tests/manifest-serializer/driver.cxx @@ -247,7 +247,7 @@ fail (const pairs& m) cerr << "nofail: " << r << endl; return false; } - catch (const manifest_serialization& e) + catch (const manifest_serialization&) { //cerr << e << endl; } diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx index bdc5f4a..b154bce 100644 --- a/tests/process/driver.cxx +++ b/tests/process/driver.cxx @@ -294,8 +294,13 @@ main (int argc, const char* argv[]) v.reserve (5000 * 256); for (size_t i (0); i < 5000; ++i) { - for (size_t c (0); c < 256; ++c) + char c (numeric_limits::min ()); + + do + { v.push_back (c); + } + while (c++ != numeric_limits::max ()); } assert (exec (p, v, true, true)); diff --git a/tests/target-triplet/driver.cxx b/tests/target-triplet/driver.cxx index 8691bac..b446a6f 100644 --- a/tests/target-triplet/driver.cxx +++ b/tests/target-triplet/driver.cxx @@ -152,7 +152,7 @@ fail (const char* s) cerr << "nofail: " << s << endl; return false; } - catch (invalid_argument& e) + catch (const invalid_argument&) { //cerr << e << endl; } diff --git a/tests/timestamp/driver.cxx b/tests/timestamp/driver.cxx index b268e00..d1e8d2c 100644 --- a/tests/timestamp/driver.cxx +++ b/tests/timestamp/driver.cxx @@ -2,7 +2,7 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -#include // tzset() +#include // tzset() (POSIX), _tzset() (Windows) #include #include @@ -80,7 +80,13 @@ ns (unsigned long long t) int main () { - tzset (); // To use butl::to_stream() later on. + // To use butl::to_stream() later on. + // +#ifndef _WIN32 + tzset (); +#else + _tzset (); +#endif // Invalid %[]. // -- cgit v1.1