Clear GCC -Wstrict-overflow warning

This is a false positive when "T=int" or "T=long". "value" is reduced by division so it converges to 0. It is never less than 0.
pull/546/head
Jeffrey Walton 2018-01-20 19:37:58 -05:00
parent 1b36c4e767
commit 2816efe188
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 0 deletions

1
misc.h
View File

@ -524,6 +524,7 @@ template <class T> inline const T& STDMAX(const T& a, const T& b)
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsign-compare"
# pragma GCC diagnostic ignored "-Wstrict-overflow"
# if (CRYPTOPP_LLVM_CLANG_VERSION >= 20800) || (CRYPTOPP_APPLE_CLANG_VERSION >= 30000)
# pragma GCC diagnostic ignored "-Wtautological-compare"
# elif (CRYPTOPP_GCC_VERSION >= 40300)