From 819d2c3575f11674ce115bcb300c25c2e1b8ed80 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Tue, 27 Oct 2015 12:14:30 -0400 Subject: [PATCH] Minor cleanup and crank up warnings. --- date.h | 2 +- test/testit | 2 +- tz.cpp | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/date.h b/date.h index ca1622d..2471266 100644 --- a/date.h +++ b/date.h @@ -2253,7 +2253,7 @@ year_month_day::operator day_point() const noexcept #ifdef _MSC_VER #pragma warning(pop) #endif - auto const doe = yoe * 365 + yoe/4 - yoe/100 + doy; // [0, 146096] + auto const doe = yoe * 365 + yoe/4 - yoe/100 + doy; // [0, 146096] return day_point{days{era * 146097 + static_cast(doe) - 719468}}; } diff --git a/test/testit b/test/testit index 55045b9..4ac6585 100755 --- a/test/testit +++ b/test/testit @@ -30,7 +30,7 @@ if [ -z "$CXX_LANG" ] then CXX_LANG=c++14 fi -OPTIONS="-std=${CXX_LANG} $OPTIONS -I$ROOT" +OPTIONS="-std=${CXX_LANG} $OPTIONS -I$ROOT -Wall" case $TRIPLE in *-*-mingw* | *-*-cygwin* | *-*-win*) diff --git a/tz.cpp b/tz.cpp index f60f916..57ea5bc 100644 --- a/tz.cpp +++ b/tz.cpp @@ -1471,9 +1471,6 @@ find_rule_for_zone(const std::pair& eqr, case tz::local: found = tp_loc < r->mdt().to_time_point(ry); break; - default: - found = false; - assert(false); } if (found) break;