summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-13 13:12:33 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-13 13:12:33 +0100
commit05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b (patch)
treeefdb11a7402a08c850ed3de63df538268abb3dda /pp_sys.c
parent3a7a94e274d5af79b9dacbe2adc9c4cabcf24a08 (diff)
downloadperl-05fe29fd3bc243a33acdc8a62bc4ce42df75ca4b.tar.gz
Make overflow warnings in gmtime/localtime only occur when warnings are on
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index f516e3332d..fa0c79a8e6 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);