diff options
author | Zefram <zefram@fysh.org> | 2010-12-11 18:18:12 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2010-12-11 18:23:16 +0000 |
commit | c33e8be1506a75e393304af89d64e3f46e0ca7cb (patch) | |
tree | 064f08620e62d11eca50f73b7439564b702f47ad /ext/B/B.xs | |
parent | d6f31ecf904f01f8a2aab2bca55e33b1b51e0b4d (diff) | |
download | perl-c33e8be1506a75e393304af89d64e3f46e0ca7cb.tar.gz |
fix various compiler warnings from XS code
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
Diffstat (limited to 'ext/B/B.xs')
-rw-r--r-- | ext/B/B.xs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index b439236abb..c5d971ba89 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -258,7 +258,7 @@ make_sv_object(pTHX_ SV *sv) IV iv; dMY_CXT; - for (iv = 0; iv < sizeof(specialsv_list)/sizeof(SV*); iv++) { + for (iv = 0; iv < (IV)(sizeof(specialsv_list)/sizeof(SV*)); iv++) { if (sv == specialsv_list[iv]) { type = "B::SPECIAL"; break; @@ -959,6 +959,9 @@ next(o) ret = sv_2mortal(newSVpv(*((char **)ptr), 0)); break; #endif + default: + croak("Illegal alias 0x%08x for B::*next", (unsigned)ix); + } ST(0) = ret; XSRETURN(1); @@ -1516,6 +1519,8 @@ IVX(sv) case (U8)(sv_U16p >> 16): ret = sv_2mortal(newSVuv(*((U16 *)ptr))); break; + default: + croak("Illegal alias 0x%08x for B::*IVX", (unsigned)ix); } ST(0) = ret; XSRETURN(1); @@ -1808,6 +1813,8 @@ SV(gv) case (U8)(line_tp >> 16): ret = sv_2mortal(newSVuv(*((line_t *)ptr))); break; + default: + croak("Illegal alias 0x%08x for B::*SV", (unsigned)ix); } ST(0) = ret; XSRETURN(1); |