summaryrefslogtreecommitdiff
path: root/validate.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-10-14 09:23:53 -0400
committerJeffrey Walton <noloader@gmail.com>2019-10-14 09:23:53 -0400
commit1b8cd7e818fea61b9d6b6c1f6d0c36d0f1d8a663 (patch)
tree25f89b62e292195363f248015038c9bf1ef54cc2 /validate.h
parent04cfd0720a1a3dcc907b7db0eb33db72d97a9366 (diff)
downloadcryptopp-git-1b8cd7e818fea61b9d6b6c1f6d0c36d0f1d8a663.tar.gz
Clear missing initializer under early GCC
This created over 700 warnings when running cryptest.sh
Diffstat (limited to 'validate.h')
-rw-r--r--validate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/validate.h b/validate.h
index 02204cc7..7695e692 100644
--- a/validate.h
+++ b/validate.h
@@ -202,7 +202,7 @@ private:
inline std::string TimeToString(const time_t& t)
{
#if (CRYPTOPP_MSC_VERSION >= 1400)
- tm localTime = {};
+ tm localTime;
char timeBuf[64];
errno_t err;
@@ -213,7 +213,7 @@ inline std::string TimeToString(const time_t& t)
std::string str(err == 0 ? timeBuf : "");
#elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || defined(_POSIX_SOURCE))
- tm localTime = {};
+ tm localTime;
char timeBuf[64];
char* timeString = ::asctime_r(::localtime_r(&t, &localTime), timeBuf);
std::string str(timeString ? timeString : "");