Warning incorrectly reported without -w
Rafael Garcia-Suarez [Tue, 14 Aug 2001 21:23:27 +0000 (23:23 +0200)]
Message-ID: <20010814212327.A1919@rafael>

p4raw-id: //depot/perl@11673

doio.c

diff --git a/doio.c b/doio.c
index a20d4e2..0309e2a 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1222,7 +1222,9 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
                sv_utf8_upgrade(sv = sv_mortalcopy(sv));
        }
        else if (DO_UTF8(sv)) {
-           if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)) {
+           if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)
+               && ckWARN(WARN_UTF8))
+           {
                Perl_warner(aTHX_ WARN_UTF8, "Wide character in print");
            }
        }