In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/2dcac756b8b2c3b3d7d34174ba27b78fb1c7ba4a?hp=ec0363d9bb05a67dad10a50c9b76b5aba365199a>
- Log ----------------------------------------------------------------- commit 2dcac756b8b2c3b3d7d34174ba27b78fb1c7ba4a Author: Jan Dubois <[email protected]> Date: Wed Dec 15 22:41:47 2010 -0800 Silence some data truncation compiler warnings ----------------------------------------------------------------------- Summary of changes: gv.c | 2 +- pp_sys.c | 2 +- regcomp.c | 6 +++--- regexec.c | 2 +- scope.c | 2 +- toke.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gv.c b/gv.c index 5d7837c..4e79171 100644 --- a/gv.c +++ b/gv.c @@ -1914,7 +1914,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id) do_update: /* If we're looking up a destructor to invoke, we must avoid * that Gv_AMupdate croaks, because we might be dying already */ - if (Gv_AMupdate(stash, id == DESTROY_amg) == -1) { + if (Gv_AMupdate(stash, cBOOL(id == DESTROY_amg)) == -1) { /* and if it didn't found a destructor, we fall back * to a simpler method that will only look for the * destructor instead of the whole magic */ diff --git a/pp_sys.c b/pp_sys.c index d27bde6..89e131c 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3059,7 +3059,7 @@ PP(pp_ftrread) conditional compiling below much clearer. */ I32 use_access = 0; #endif - int stat_mode = S_IRUSR; + Mode_t stat_mode = S_IRUSR; bool effective = FALSE; char opchar = '?'; diff --git a/regcomp.c b/regcomp.c index ba3d0dc..fb9c606 100644 --- a/regcomp.c +++ b/regcomp.c @@ -8179,14 +8179,14 @@ S_checkposixcc(pTHX_ RExC_state_t *pRExC_state) ANYOF_##NAME: \ for (value = 0; value < 256; value++) \ if (TEST) \ - stored += S_set_regclass_bit(aTHX_ pRExC_state, ret, value); \ + stored += S_set_regclass_bit(aTHX_ pRExC_state, ret, (U8) value); \ yesno = '+'; \ what = WORD; \ break; \ case ANYOF_N##NAME: \ for (value = 0; value < 256; value++) \ if (!TEST) \ - stored += S_set_regclass_bit(aTHX_ pRExC_state, ret, value); \ + stored += S_set_regclass_bit(aTHX_ pRExC_state, ret, (U8) value); \ yesno = '!'; \ what = WORD; \ break @@ -8950,7 +8950,7 @@ parseit: && (! _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(value)) /* If the latest code point has a fold whose * bit is set, it must be the only other one */ - && ((prevvalue = PL_fold_latin1[value]) != value) + && ((prevvalue = PL_fold_latin1[value]) != (IV)value) && ANYOF_BITMAP_TEST(ret, prevvalue))))) { /* Note that the information needed to decide to do this optimization diff --git a/regexec.c b/regexec.c index b818aa1..591018a 100644 --- a/regexec.c +++ b/regexec.c @@ -5893,7 +5893,7 @@ S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth) char *tmpeol = loceol; while (hardcount < max && foldEQ_utf8(scan, &tmpeol, 0, utf8_target, - STRING(p), NULL, 1, UTF_PATTERN)) + STRING(p), NULL, 1, cBOOL(UTF_PATTERN))) { scan = tmpeol; tmpeol = loceol; diff --git a/scope.c b/scope.c index 80846b6..fb93db0 100644 --- a/scope.c +++ b/scope.c @@ -187,7 +187,7 @@ S_save_scalar_at(pTHX_ SV **sptr, const U32 flags) (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; } if (!(flags & SAVEf_KEEPOLDELEM)) - mg_localize(osv, sv, (flags & SAVEf_SETMAGIC) != 0); + mg_localize(osv, sv, cBOOL(flags & SAVEf_SETMAGIC)); } return sv; diff --git a/toke.c b/toke.c index 05ede22..792a46f 100644 --- a/toke.c +++ b/toke.c @@ -14256,7 +14256,7 @@ S_parse_recdescent(pTHX_ int gramtype, I32 fakeeof) SAVEI32(PL_lex_allbrackets); PL_lex_allbrackets = 0; SAVEI8(PL_lex_fakeeof); - PL_lex_fakeeof = fakeeof; + PL_lex_fakeeof = (U8)fakeeof; if(yyparse(gramtype) && !PL_parser->error_count) qerror(Perl_mess(aTHX_ "Parse error")); } -- Perl5 Master Repository
