summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>1999-06-27 00:19:52 +0100
committerGurusamy Sarathy <gsar@cpan.org>1999-07-07 09:45:43 +0000
commit0453d815b8a74697ff1e5451c27aba2fe537b8e0 (patch)
treeb6275867deb61ba13fb0e665d516f115dd9f1d69 /perlio.c
parent69e210baba6414aba2758bc791a6dc3e9e167d9d (diff)
downloadperl-0453d815b8a74697ff1e5451c27aba2fe537b8e0.tar.gz
lexical warnings update (warning.t fails one test
due to leaked scalar, investigation pending) Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C8E@mbtlipnt02.btlabs.bt.co.uk> Subject: [PATCH 5.005_57] Lexical Warnings - mandatory warning are now default warnings p4raw-id: //depot/perl@3640
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/perlio.c b/perlio.c
index 3094ea767c..505548ae39 100644
--- a/perlio.c
+++ b/perlio.c
@@ -141,8 +141,8 @@ PerlIO_canset_cnt(PerlIO *f)
void
PerlIO_set_cnt(PerlIO *f, int cnt)
{
- if (cnt < -1)
- Perl_warn(aTHX_ "Setting cnt to %d\n",cnt);
+ if (cnt < -1 && ckWARN_s(WARN_INTERNAL))
+ Perl_warner(aTHX_ WARN_INTERNAL, "Setting cnt to %d\n",cnt);
#if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE)
FILE_cnt(f) = cnt;
#else
@@ -157,10 +157,10 @@ PerlIO_set_ptrcnt(PerlIO *f, STDCHAR *ptr, int cnt)
#ifdef FILE_bufsiz
STDCHAR *e = FILE_base(f) + FILE_bufsiz(f);
int ec = e - ptr;
- if (ptr > e + 1)
- Perl_warn(aTHX_ "Setting ptr %p > end+1 %p\n", ptr, e + 1);
- if (cnt != ec)
- Perl_warn(aTHX_ "Setting cnt to %d, ptr implies %d\n",cnt,ec);
+ if (ptr > e + 1 && ckWARN_s(WARN_INTERNAL))
+ Perl_warner(aTHX_ WARN_INTERNAL, "Setting ptr %p > end+1 %p\n", ptr, e + 1);
+ if (cnt != ec && ckWARN_s(WARN_INTERNAL))
+ Perl_warner(aTHX_ WARN_INTERNAL, "Setting cnt to %d, ptr implies %d\n",cnt,ec);
#endif
#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE)
FILE_ptr(f) = ptr;