From 0cfa64bfe0ab570e7b2ddddfdad71f8341a5e6e1 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 31 Dec 2013 21:41:09 -0700 Subject: [PATCH] utf8.c: Don't do redundant test The test here for WARN_UTF8 is redundant, as only if one of the other three warning categories is enabled will anything actually be output. --- utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utf8.c b/utf8.c index 3b4aa8f..7eb4374 100644 --- a/utf8.c +++ b/utf8.c @@ -107,7 +107,7 @@ Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) /* The first problematic code point is the first surrogate */ if (uv >= UNICODE_SURROGATE_FIRST - && ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) + && ckWARN3_d(WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) { if (UNICODE_IS_SURROGATE(uv)) { if (flags & UNICODE_WARN_SURROGATE) { -- 2.7.4