diff options
author | Michael G Schwern <schwern@pobox.com> | 2008-09-14 14:57:07 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-03 18:37:12 +0100 |
commit | 5b6366c2b24f4ede69b7d904d8bceeac450b21bf (patch) | |
tree | 457407f3e83acdb7ba59d127ca4f3c7b59577802 /pp_sys.c | |
parent | 7bda3dfccb26dc3c52669a7451b220893a99a1be (diff) | |
download | perl-5b6366c2b24f4ede69b7d904d8bceeac450b21bf.tar.gz |
Fix the overflow warning to just check for an error.
Fix the overflow warning to identify the right op.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4470,9 +4470,11 @@ PP(pp_gmtime) else err = gmtime64_r(&when, &tmbuf); - if( (tmbuf.tm_year + 1900) < 0 ) + if( err == NULL ) { + char *opname = PL_op->op_type == OP_LOCALTIME ? "localtime" : "gmtime"; Perl_warner(aTHX_ packWARN(WARN_OVERFLOW), - "local/gmtime under/overflowed the year"); + "%s under/overflowed the year", opname); + } if (GIMME != G_ARRAY) { /* scalar context */ SV *tsv; |