This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a89bb6
)
utf8.c: Don't do redundant test
author
Karl Williamson
<public@khwilliamson.com>
Wed, 1 Jan 2014 04:41:09 +0000
(21:41 -0700)
committer
Karl Williamson
<public@khwilliamson.com>
Wed, 1 Jan 2014 20:49:23 +0000
(13:49 -0700)
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
patch
|
blob
|
blame
|
history
diff --git
a/utf8.c
b/utf8.c
index
3b4aa8f
..
7eb4374
100644
(file)
--- 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
- && ckWARN
4_d(WARN_UTF8,
WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR))
+ && ckWARN
3_d(
WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR))
{
if (UNICODE_IS_SURROGATE(uv)) {
if (flags & UNICODE_WARN_SURROGATE) {