In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c12d2356eacf7eb193de44daf7722a24739a07cd?hp=2e66fe905dd7ad04f1d82df888fa62650d3d2165>
- Log ----------------------------------------------------------------- commit c12d2356eacf7eb193de44daf7722a24739a07cd Author: David Mitchell <[email protected]> Date: Mon Aug 15 09:17:52 2016 +0100 Hash-Util/Util.xs: silence compiler warnings Util.c: In function âXS_Hash__Util_bucket_ratioâ: Util.c:638:7: warning: unused variable âRETVALâ [-Wunused-variable] SV * RETVAL; Don't declare a return type if we're not going to use it. M ext/Hash-Util/Util.xs commit 8432384f70fa11d746c8a64c124d37c100db48c4 Author: David Mitchell <[email protected]> Date: Mon Aug 15 08:55:06 2016 +0100 silence warning in Opcode.xs Opcode.xs:71:21: warning: overflow in implicit constant conversion [-Woverflow] bitmap[len-1] = (PL_maxo & 0x07) ? ~(0xFF << (PL_maxo & 0x07)) : 0xFF; This was due to to PL_maxo being converted from a var into a const value in a previous commit. M ext/Opcode/Opcode.pm M ext/Opcode/Opcode.xs ----------------------------------------------------------------------- Summary of changes: ext/Hash-Util/Util.xs | 6 +++--- ext/Opcode/Opcode.pm | 2 +- ext/Opcode/Opcode.xs | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ext/Hash-Util/Util.xs b/ext/Hash-Util/Util.xs index db3fb5a..f419c6d 100644 --- a/ext/Hash-Util/Util.xs +++ b/ext/Hash-Util/Util.xs @@ -274,7 +274,7 @@ bucket_array(rhv) XSRETURN(0); } -SV* +void bucket_ratio(rhv) SV* rhv PROTOTYPE: \% @@ -295,7 +295,7 @@ bucket_ratio(rhv) XSRETURN_UNDEF; } -SV* +void num_buckets(rhv) SV* rhv PROTOTYPE: \% @@ -310,7 +310,7 @@ num_buckets(rhv) XSRETURN_UNDEF; } -SV* +void used_buckets(rhv) SV* rhv PROTOTYPE: \% diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index f492532..912aa4d 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -6,7 +6,7 @@ use strict; our($VERSION, @ISA, @EXPORT_OK); -$VERSION = "1.36"; +$VERSION = "1.37"; use Carp; use Exporter (); diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index 936ffba..5c8e22d 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -51,7 +51,7 @@ op_names_init(pTHX) int i; STRLEN len; char **op_names; - char *bitmap; + U8 *bitmap; dMY_CXT; op_named_bits = newHV(); @@ -65,10 +65,11 @@ op_names_init(pTHX) put_op_bitspec(aTHX_ STR_WITH_LEN(":none"), sv_2mortal(new_opset(aTHX_ Nullsv))); opset_all = new_opset(aTHX_ Nullsv); - bitmap = SvPV(opset_all, len); + bitmap = (U8*)SvPV(opset_all, len); memset(bitmap, 0xFF, len-1); /* deal with last byte specially, see below */ /* Take care to set the right number of bits in the last byte */ - bitmap[len-1] = (PL_maxo & 0x07) ? ~(0xFF << (PL_maxo & 0x07)) : 0xFF; + bitmap[len-1] = (PL_maxo & 0x07) ? ((~(0xFF << (PL_maxo & 0x07))) & 0xFF) + : 0xFF; put_op_bitspec(aTHX_ STR_WITH_LEN(":all"), opset_all); /* don't mortalise */ } -- Perl5 Master Repository
