From: Rafael Garcia-Suarez Date: Fri, 13 Mar 2009 12:12:33 +0000 (+0100) Subject: Make overflow warnings in gmtime/localtime only occur when warnings are on X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b;p=p5sagit%2Fp5-mst-13.2.git Make overflow warnings in gmtime/localtime only occur when warnings are on --- diff --git a/pp_sys.c b/pp_sys.c index f516e33..fa0c79a 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -4466,7 +4466,7 @@ PP(pp_gmtime) */ double input = POPn; when = (Time64_T)input; - if( when != input ) { + if (when != input && ckWARN(WARN_OVERFLOW)) { Perl_warner(aTHX_ packWARN(WARN_OVERFLOW), "%s(%.0f) too large", opname, input); } @@ -4478,7 +4478,7 @@ PP(pp_gmtime) err = gmtime64_r(&when, &tmbuf); #endif - if( err == NULL ) { + if (err == NULL && ckWARN(WARN_OVERFLOW)) { /* XXX %lld broken for quads */ Perl_warner(aTHX_ packWARN(WARN_OVERFLOW), "%s(%.0f) failed", opname, (double)when);