From: Steve Hay Date: Tue, 28 Nov 2006 15:57:45 +0000 (+0000) Subject: Silence VC++ 8 warnings about "possible loss of data" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aebaba0b5be8c1153dcfd9402824b0dc15298fe9;p=p5sagit%2Fp5-mst-13.2.git Silence VC++ 8 warnings about "possible loss of data" p4raw-id: //depot/perl@29408 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 3c7b0b8..8f51750 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1804,7 +1804,7 @@ mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0) mytm.tm_wday = wday; mytm.tm_yday = yday; mytm.tm_isdst = isdst; - RETVAL = mktime(&mytm); + RETVAL = (SysRetLong) mktime(&mytm); } OUTPUT: RETVAL diff --git a/pp_sys.c b/pp_sys.c index 1d0b552..6754c3e 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -2910,9 +2910,9 @@ PP(pp_stat) PUSHs(sv_2mortal(newSVnv(PL_statcache.st_mtime))); PUSHs(sv_2mortal(newSVnv(PL_statcache.st_ctime))); #else - PUSHs(sv_2mortal(newSViv(PL_statcache.st_atime))); - PUSHs(sv_2mortal(newSViv(PL_statcache.st_mtime))); - PUSHs(sv_2mortal(newSViv(PL_statcache.st_ctime))); + PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_atime))); + PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_mtime))); + PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_ctime))); #endif #ifdef USE_STAT_BLOCKS PUSHs(sv_2mortal(newSVuv(PL_statcache.st_blksize)));