diff options
author | Reini Urban <rurban@x-ray.at> | 2011-11-22 13:30:08 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-22 21:29:35 -0800 |
commit | a3f353cf7aaf90ddfb021a9733ff75f4437d4e70 (patch) | |
tree | 33f4d03978c9ff0c2d8816f781cef5521b9b55f7 /ext/arybase | |
parent | 12578ffb87141969c464832f697dbec3b2bb0eb4 (diff) | |
download | perl-a3f353cf7aaf90ddfb021a9733ff75f4437d4e70.tar.gz |
arybase.xs be more defensive
There can be no other keys used with ab_ck_base but clang's static
analyzer has a point in complaining about the missing default case.
This is too fragile if any CHECK is added in BOOT.
Diffstat (limited to 'ext/arybase')
-rw-r--r-- | ext/arybase/arybase.xs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs index d654b545e5..861b322380 100644 --- a/ext/arybase/arybase.xs +++ b/ext/arybase/arybase.xs @@ -343,6 +343,10 @@ static OP *ab_ck_base(pTHX_ OP *o) case OP_RINDEX : old_ck = ab_old_ck_rindex ; break; case OP_INDEX : old_ck = ab_old_ck_index ; break; case OP_POS : old_ck = ab_old_ck_pos ; break; + default: + DIE(aTHX_ + "panic: invalid op type for arybase.xs:ab_ck_base: %d", + PL_op->op_type); } o = (*old_ck)(aTHX_ o); /* We need two switch blocks, as the type may have changed. */ |