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:
8be3c4c
)
Use NOT_REACHED for the impossible case.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 30 May 2014 01:24:47 +0000
(21:24 -0400)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 30 May 2014 01:30:19 +0000
(21:30 -0400)
The default case really is impossible because all the valid
enums values are already covered in the switch.
The NOT_REACHED; is for the compiler (from perl.h),
the /* NOTREACHED */ is for static analyzers.
regexp.h
patch
|
blob
|
blame
|
history
diff --git
a/regexp.h
b/regexp.h
index
db7ae8b
..
59d5ee2
100644
(file)
--- a/
regexp.h
+++ b/
regexp.h
@@
-382,7
+382,7
@@
get_regex_charset_name(const U32 flags, STRLEN* const lenp)
*lenp = 2;
return ASCII_MORE_RESTRICT_PAT_MODS;
default:
-
return "?"; /* Unknown
*/
+
NOT_REACHED; /* NOTREACHED
*/
}
}