Silence VC++ 8 warnings about "possible loss of data"
authorSteve Hay <SteveHay@planit.com>
Tue, 28 Nov 2006 15:57:45 +0000 (15:57 +0000)
committerSteve Hay <SteveHay@planit.com>
Tue, 28 Nov 2006 15:57:45 +0000 (15:57 +0000)
p4raw-id: //depot/perl@29408

ext/POSIX/POSIX.xs
pp_sys.c

index 3c7b0b8..8f51750 100644 (file)
@@ -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
index 1d0b552..6754c3e 100644 (file)
--- 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)));