summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-05-31 22:15:11 -0600
committerKarl Williamson <public@khwilliamson.com>2011-06-02 15:31:58 -0600
commit0984e55ea51a3030ba112fb0dd331061c5b0acf5 (patch)
tree2bf02ae255f644b54f7a943e4279151705cdad29 /regexp.h
parentba05d9aa44289620c9265dde65c83402e0ebfd00 (diff)
downloadperl-0984e55ea51a3030ba112fb0dd331061c5b0acf5.tar.gz
regexp.h: work around -Werror compile failure of XS in linux perf tool
The linux perf tool has an XS component, but when built using system perl 5.14.0, its compilation errors out on the switch statement in regexp.h: get_regex_charset_name(), which lacks a default case. Add one, copying the end-of-function return "?". Preserve the end-of-function return "?", to avoid a hypothetical compiler bug which misses the default case, and infers a void return for a function thats declared otherwize. Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/regexp.h b/regexp.h
index c4fa6090ed..5776a9023a 100644
--- a/regexp.h
+++ b/regexp.h
@@ -323,8 +323,9 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp)
case REGEX_ASCII_MORE_RESTRICTED_CHARSET:
*lenp = 2;
return ASCII_MORE_RESTRICT_PAT_MODS;
+ default:
+ return "?"; /* Unknown */
}
-
return "?"; /* Unknown */
}