From f67fa09f32d01c6776511836206330b855178fff Mon Sep 17 00:00:00 2001 From: Earnie Boyd Date: Fri, 21 Jun 2013 11:46:12 -0400 Subject: [PATCH] Resolve incorrect type casts in time.h. --- ChangeLog | 4 ++++ include/time.h | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36ad7f3..7bee564 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-06-21 Mark Brand + + * include/time.h: Correct typecasts throughout. + 2013-06-18 Earnie Boyd * include/io.h (_findfirst*, _findnext*): Remove the __NO_INLINE__ diff --git a/include/time.h b/include/time.h index ca55701..1a24d1d 100644 --- a/include/time.h +++ b/include/time.h @@ -157,7 +157,7 @@ _CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime32 (const __time32_t*); _CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime32(const __time32_t*); #else /* MSVCRT_VERSION < 800 */ _CRTALIAS __time32_t __cdecl __MINGW_NOTHROW _time32 (__time32_t *_v) { - return ((__time32_t)time((time_t)_v)); + return ((__time32_t)time((time_t*)_v)); } _CRTALIAS double __cdecl __MINGW_NOTHROW _difftime32 (__time32_t _v1, __time32_t _v2) { return (difftime((time_t)_v1, (time_t)_v2)); @@ -166,13 +166,13 @@ _CRTALIAS __time32_t __cdecl __MINGW_NOTHROW _mktime32(struct tm* _v1) { return ((__time32_t)mktime(_v1)); } _CRTALIAS char* __cdecl __MINGW_NOTHROW _ctime32(const __time32_t* _v1) { - return (ctime((time_t)_v1)); + return (ctime((time_t*)_v1)); } _CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _gmtime32(const __time32_t* _v1) { - return (gmtime((time_t)_v1)); + return (gmtime((time_t*)_v1)); } _CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _localtime32(const __time32_t* _v1) { - return (localtime((time_t)_v1)); + return (localtime((time_t*)_v1)); } #endif /* MSVCRT_VERSION >= 800 */ @@ -253,7 +253,7 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t*); #else _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*); _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t* _v) { - return(_wctime((time_t)_v)); + return(_wctime((time_t*)_v)); } #endif /* MSVCRT_VERSION >= 800 */ -- 2.11.0