In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/23270f966ec4ff1b9f41f332ac6a33cf250742f9?hp=44d6f4bb188d509de38adc221f9892c9dc684fb8>
- Log ----------------------------------------------------------------- commit 23270f966ec4ff1b9f41f332ac6a33cf250742f9 Author: David Mitchell <[email protected]> Date: Fri Oct 17 12:16:40 2014 +0100 fix some recent compiler warnings Currently DBVARMG_SINGLE is deffed to 0, so mg->mg_private >= DBVARMG_SINGLE gives an 'always true' warning. sv_magicext's last arg is supposed to to be I32, but ARGTARG is a U32 or U64. ----------------------------------------------------------------------- Summary of changes: mg.c | 10 ++++++++-- pp.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mg.c b/mg.c index bf98374..4524d01 100644 --- a/mg.c +++ b/mg.c @@ -3464,7 +3464,10 @@ int Perl_magic_setdebugvar(pTHX_ SV *sv, MAGIC *mg) { PERL_ARGS_ASSERT_MAGIC_SETDEBUGVAR; - assert(mg->mg_private >= DBVARMG_SINGLE && mg->mg_private < DBVARMG_COUNT); +#if DBVARMG_SINGLE != 0 + assert(mg->mg_private >= DBVARMG_SINGLE); +#endif + assert(mg->mg_private < DBVARMG_COUNT); PL_DBcontrol[mg->mg_private] = SvIV_nomg(sv); @@ -3475,7 +3478,10 @@ int Perl_magic_getdebugvar(pTHX_ SV *sv, MAGIC *mg) { PERL_ARGS_ASSERT_MAGIC_GETDEBUGVAR; - assert(mg->mg_private >= DBVARMG_SINGLE && mg->mg_private < DBVARMG_COUNT); +#if DBVARMG_SINGLE != 0 + assert(mg->mg_private >= DBVARMG_SINGLE); +#endif + assert(mg->mg_private < DBVARMG_COUNT); sv_setiv(sv, PL_DBcontrol[mg->mg_private]); return 0; diff --git a/pp.c b/pp.c index 25e3ac4..67dc770 100644 --- a/pp.c +++ b/pp.c @@ -6288,7 +6288,7 @@ PP(pp_lvref) SV * const arg = PL_op->op_flags & OPf_STACKED ? POPs : NULL; MAGIC * const mg = sv_magicext(ret, arg, PERL_MAGIC_lvref, &PL_vtbl_lvref, (char *)elem, - elem ? HEf_SVKEY : ARGTARG); + elem ? HEf_SVKEY : (I32)ARGTARG); mg->mg_private = PL_op->op_private; if (PL_op->op_private & OPpLVREF_ITER) mg->mg_flags |= MGf_PERSIST; -- Perl5 Master Repository
