diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-13 13:12:33 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-13 13:12:33 +0100 |
commit | 05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b (patch) | |
tree | efdb11a7402a08c850ed3de63df538268abb3dda | |
parent | 3a7a94e274d5af79b9dacbe2adc9c4cabcf24a08 (diff) | |
download | perl-05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b.tar.gz |
Make overflow warnings in gmtime/localtime only occur when warnings are on
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |