From 23b5e7f10edcb54d11565e7fd4d7a1cdede6f32d Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 30 May 2017 15:03:43 +0200 Subject: [PATCH] Fix compiler warnings for 32 bit windows by changing datatype for parameter 1 for gmtime_r() --- src/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index a20bfe7fd..d7c61d5e6 100644 --- a/src/main.c +++ b/src/main.c @@ -785,14 +785,20 @@ static void main_wordlist_cache_generate (MAYBE_UNUSED hashcat_ctx_t *hashcat_ct { char *runtime = (char *) malloc (HCBUFSIZ_TINY); + #if defined (_WIN) + __time64_t runtime_sec = cache_generate->runtime; + #else + time_t runtime_sec = cache_generate->runtime; + #endif + struct tm *tmp; #if defined (_WIN) - tmp = _gmtime64 (&cache_generate->runtime); + tmp = _gmtime64 (&runtime_sec); #else struct tm tm; - tmp = gmtime_r (&cache_generate->runtime, &tm); + tmp = gmtime_r (&runtime_sec, &tm); #endif format_timer_display (tmp, runtime, HCBUFSIZ_TINY);