From: Robin Barker Date: Tue, 12 Apr 2005 18:53:32 +0000 (+0100) Subject: -Wformat X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e45843364c6c14961f5f9e7f270e051a7c0891dc;p=p5sagit%2Fp5-mst-13.2.git -Wformat Message-ID: <533D273D4014D411AB1D00062938C4D90849C634@hotel.npl.co.uk> p4raw-id: //depot/perl@24233 --- diff --git a/perly.c b/perly.c index 75c7ed3..d763c0e 100644 --- a/perly.c +++ b/perly.c @@ -119,7 +119,7 @@ yysymprint (pTHX_ PerlIO *yyoutput, int yytype, YYSTYPE *yyvaluep) # ifdef YYPRINT YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else - YYFPRINTF (yyoutput, "0x%x", yyvaluep->ival); + YYFPRINTF (yyoutput, "0x%"UVxf, (UV)yyvaluep->ival); # endif } else @@ -160,7 +160,7 @@ yy_stack_print (pTHX_ short *yyss, short *yyssp, YYSTYPE *yyvs, const char**yyns PerlIO_printf(Perl_debug_log, " %8.8s", *yyns); PerlIO_printf(Perl_debug_log, "\nvalue:"); for (i=0, yyvs += start; i < count; i++, yyvs++) - PerlIO_printf(Perl_debug_log, " %8x", yyvs->ival); + PerlIO_printf(Perl_debug_log, " %8"UVxf, (UV)yyvs->ival); PerlIO_printf(Perl_debug_log, "\n\n"); } diff --git a/regcomp.c b/regcomp.c index 30c492b..65a8988 100644 --- a/regcomp.c +++ b/regcomp.c @@ -779,7 +779,7 @@ and would end up looking like: tmp = newSVpv( "", 0 ); \ pv_uni_display( tmp, uc, len, 60, UNI_DISPLAY_REGEX ); \ } else { \ - tmp = Perl_newSVpvf_nocontext( "%c", uvc ); \ + tmp = Perl_newSVpvf_nocontext( "%c", (int)uvc ); \ } \ av_push( trie->revcharmap, tmp ); \ }) @@ -921,7 +921,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs svpp = hv_fetch( trie->widecharmap, (char*)&uvc, sizeof( UV ), 1 ); if ( !svpp ) - Perl_croak( aTHX_ "error creating/fetching widecharmap entry for 0x%X", uvc ); + Perl_croak( aTHX_ "error creating/fetching widecharmap entry for 0x%"UVXf, uvc ); if ( !SvTRUE( *svpp ) ) { sv_setiv( *svpp, ++trie->uniquecharcount ); @@ -1032,7 +1032,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs state = newstate; } else { - Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %d", uvc ); + Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %"IVdf, uvc ); } /* charid is now 0 if we dont know the char read, or nonzero if we do */ } @@ -1070,20 +1070,20 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs for( state=1 ; state < next_alloc ; state ++ ) { - PerlIO_printf( Perl_debug_log, "\n %04X :", state ); + PerlIO_printf( Perl_debug_log, "\n %04"UVXf" :", (UV)state ); if ( ! trie->states[ state ].wordnum ) { PerlIO_printf( Perl_debug_log, "%5s| ",""); } else { - PerlIO_printf( Perl_debug_log, "W%04X| ", + PerlIO_printf( Perl_debug_log, "W%04x| ", trie->states[ state ].wordnum ); } for( charid = 1 ; charid <= TRIE_LIST_USED( state ) ; charid++ ) { SV **tmp = av_fetch( trie->revcharmap, TRIE_LIST_ITEM(state,charid).forid, 0); - PerlIO_printf( Perl_debug_log, "%s:%3X=%04X | ", + PerlIO_printf( Perl_debug_log, "%s:%3X=%04"UVXf" | ", SvPV_nolen( *tmp ), TRIE_LIST_ITEM(state,charid).forid, - TRIE_LIST_ITEM(state,charid).newstate + (UV)TRIE_LIST_ITEM(state,charid).newstate ); } @@ -1244,7 +1244,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs } state = trie->trans[ state + charid ].next; } else { - Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %d", uvc ); + Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %"IVdf, uvc ); } /* charid is now 0 if we dont know the char read, or nonzero if we do */ } @@ -1293,16 +1293,16 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs for( state=1 ; state < next_alloc ; state += trie->uniquecharcount ) { - PerlIO_printf( Perl_debug_log, "%04X : ", TRIE_NODENUM( state ) ); + PerlIO_printf( Perl_debug_log, "%04"UVXf" : ", (UV)TRIE_NODENUM( state ) ); for( charid = 0 ; charid < trie->uniquecharcount ; charid++ ) { - PerlIO_printf( Perl_debug_log, "%04X ", - SAFE_TRIE_NODENUM( trie->trans[ state + charid ].next ) ); + PerlIO_printf( Perl_debug_log, "%04"UVXf" ", + (UV)SAFE_TRIE_NODENUM( trie->trans[ state + charid ].next ) ); } if ( ! trie->states[ TRIE_NODENUM( state ) ].wordnum ) { - PerlIO_printf( Perl_debug_log, " (%04X)\n", trie->trans[ state ].check ); + PerlIO_printf( Perl_debug_log, " (%04"UVXf")\n", (UV)trie->trans[ state ].check ); } else { - PerlIO_printf( Perl_debug_log, " (%04X) W%04X\n", trie->trans[ state ].check, + PerlIO_printf( Perl_debug_log, " (%04"UVXf") W%04X\n", (UV)trie->trans[ state ].check, trie->states[ TRIE_NODENUM( state ) ].wordnum ); } } @@ -1411,8 +1411,9 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs trie->lasttrans = pos + 1; Renew( trie->states, laststate + 1, reg_trie_state); DEBUG_TRIE_COMPILE_MORE_r( - PerlIO_printf( Perl_debug_log, " Alloc: %d Orig: %d elements, Final:%d. Savings of %%%5.2f\n", - ( ( trie->charcount + 1 ) * trie->uniquecharcount + 1 ), next_alloc, pos, + PerlIO_printf( Perl_debug_log, + " Alloc: %d Orig: %"IVdf" elements, Final:%"IVdf". Savings of %%%5.2f\n", + ( ( trie->charcount + 1 ) * trie->uniquecharcount + 1 ), (IV)next_alloc, (IV)pos, ( ( next_alloc - pos ) * 100 ) / (double)next_alloc ); ); @@ -1445,7 +1446,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs for( state = 1 ; state < trie->laststate ; state++ ) { U32 base = trie->states[ state ].trans.base; - PerlIO_printf( Perl_debug_log, "#%04X ", state); + PerlIO_printf( Perl_debug_log, "#%04"UVXf" ", (UV)state); if ( trie->states[ state ].wordnum ) { PerlIO_printf( Perl_debug_log, " W%04X", trie->states[ state ].wordnum ); @@ -1453,7 +1454,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs PerlIO_printf( Perl_debug_log, "%6s", "" ); } - PerlIO_printf( Perl_debug_log, " @%04X ", base ); + PerlIO_printf( Perl_debug_log, " @%04"UVXf" ", (UV)base ); if ( base ) { U32 ofs = 0; @@ -1463,21 +1464,21 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs && trie->trans[ base + ofs - trie->uniquecharcount ].check != state)) ofs++; - PerlIO_printf( Perl_debug_log, "+%02X[ ", ofs); + PerlIO_printf( Perl_debug_log, "+%02"UVXf"[ ", (UV)ofs); for ( ofs = 0 ; ofs < trie->uniquecharcount ; ofs++ ) { if ( ( base + ofs >= trie->uniquecharcount ) && ( base + ofs - trie->uniquecharcount < trie->lasttrans ) && trie->trans[ base + ofs - trie->uniquecharcount ].check == state ) { - PerlIO_printf( Perl_debug_log, "%04X ", - trie->trans[ base + ofs - trie->uniquecharcount ].next ); + PerlIO_printf( Perl_debug_log, "%04"UVXf" ", + (UV)trie->trans[ base + ofs - trie->uniquecharcount ].next ); } else { PerlIO_printf( Perl_debug_log, "%4s "," 0" ); } } - PerlIO_printf( Perl_debug_log, "]", ofs); + PerlIO_printf( Perl_debug_log, "]"); } PerlIO_printf( Perl_debug_log, "\n" ); @@ -1573,7 +1574,8 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg DEBUG_OPTIMISE_r({ SV *mysv=sv_newmortal(); regprop( mysv, scan); - PerlIO_printf(Perl_debug_log, "%*speep: %s (0x%08X)\n",depth*2,"",SvPV_nolen(mysv),scan); + PerlIO_printf(Perl_debug_log, "%*speep: %s (0x%08"UVXf")\n", + (int)depth*2, "", SvPV_nolen(mysv), PTR2UV(scan)); }); if (PL_regkind[(U8)OP(scan)] == EXACT) { @@ -1867,7 +1869,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg DEBUG_OPTIMISE_r({ regprop( mysv, tail ); PerlIO_printf( Perl_debug_log, "%*s%s%s%s\n", - depth * 2 + 2, "", "Tail node is:", SvPV_nolen( mysv ), + (int)depth * 2 + 2, "", "Tail node is:", SvPV_nolen( mysv ), (RExC_seen_evals) ? "[EVAL]" : "" ); }); @@ -1904,7 +1906,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg DEBUG_OPTIMISE_r({ regprop( mysv, cur); PerlIO_printf( Perl_debug_log, "%*s%s", - depth * 2 + 2," ", SvPV_nolen( mysv ) ); + (int)depth * 2 + 2," ", SvPV_nolen( mysv ) ); regprop( mysv, noper); PerlIO_printf( Perl_debug_log, " -> %s", @@ -1931,7 +1933,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg if (!last ) { regprop( mysv, first); PerlIO_printf( Perl_debug_log, "%*s%s", - depth * 2 + 2, "F:", SvPV_nolen( mysv ) ); + (int)depth * 2 + 2, "F:", SvPV_nolen( mysv ) ); regprop( mysv, NEXTOPER(first) ); PerlIO_printf( Perl_debug_log, " -> %s\n", SvPV_nolen( mysv ) ); @@ -1941,7 +1943,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg DEBUG_OPTIMISE_r({ regprop( mysv, cur); PerlIO_printf( Perl_debug_log, "%*s%s", - depth * 2 + 2, "N:", SvPV_nolen( mysv ) ); + (int)depth * 2 + 2, "N:", SvPV_nolen( mysv ) ); regprop( mysv, noper ); PerlIO_printf( Perl_debug_log, " -> %s\n", SvPV_nolen( mysv ) ); @@ -1951,7 +1953,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg if ( last ) { DEBUG_OPTIMISE_r( PerlIO_printf( Perl_debug_log, "%*s%s\n", - depth * 2 + 2, "E:", "**END**" ); + (int)depth * 2 + 2, "E:", "**END**" ); ); make_trie( pRExC_state, startbranch, first, cur, tail, optype ); } @@ -1972,14 +1974,14 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg DEBUG_OPTIMISE_r({ regprop( mysv, cur); PerlIO_printf( Perl_debug_log, - "%*s%s\t(0x%p,0x%p,0x%p)\n", depth * 2 + 2, + "%*s%s\t(0x%p,0x%p,0x%p)\n", (int)depth * 2 + 2, " ", SvPV_nolen( mysv ), first, last, cur); }); if ( last ) { DEBUG_OPTIMISE_r( PerlIO_printf( Perl_debug_log, "%*s%s\n", - depth * 2 + 2, "E:", "==END==" ); + (int)depth * 2 + 2, "E:", "==END==" ); ); make_trie( pRExC_state, startbranch, first, scan, tail, optype ); } @@ -5715,12 +5717,12 @@ S_dumpuntil(pTHX_ regnode *start, regnode *node, regnode *last, SV* sv, I32 l) const I32 arry_len = av_len(trie->words)+1; I32 word_idx; PerlIO_printf(Perl_debug_log, - "%*s[Words:%d Chars Stored:%d Unique Chars:%d States:%d%s]\n", + "%*s[Words:%d Chars Stored:%d Unique Chars:%d States:%"IVdf"%s]\n", (int)(2*(l+3)), "", trie->wordcount, trie->charcount, trie->uniquecharcount, - trie->laststate-1, + (IV)trie->laststate-1, node->flags ? " EVAL mode" : ""); for (word_idx=0; word_idx < arry_len; word_idx++) { @@ -5869,16 +5871,15 @@ Perl_regdump(pTHX_ regexp *r) PerlIO_printf(Perl_debug_log, "with eval "); PerlIO_printf(Perl_debug_log, "\n"); if (r->offsets) { - U32 i; - const U32 len = r->offsets[0]; + U32 i; + const U32 len = r->offsets[0]; GET_RE_DEBUG_FLAGS_DECL; DEBUG_OFFSETS_r({ - PerlIO_printf(Perl_debug_log, "Offsets: [%"UVuf"]\n\t", (UV)r->offsets[0]); - for (i = 1; i <= len; i++) - PerlIO_printf(Perl_debug_log, "%"UVuf"[%"UVuf"] ", - (UV)r->offsets[i*2-1], - (UV)r->offsets[i*2]); - PerlIO_printf(Perl_debug_log, "\n"); + PerlIO_printf(Perl_debug_log, "Offsets: [%"UVuf"]\n\t", (UV)r->offsets[0]); + for (i = 1; i <= len; i++) + PerlIO_printf(Perl_debug_log, "%"UVuf"[%"UVuf"] ", + (UV)r->offsets[i*2-1], (UV)r->offsets[i*2]); + PerlIO_printf(Perl_debug_log, "\n"); }); } #endif /* DEBUGGING */ diff --git a/regexec.c b/regexec.c index cb52ff7..17ee6af 100644 --- a/regexec.c +++ b/regexec.c @@ -439,7 +439,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, "UTF-8 target...\n")); PerlIO_printf(Perl_debug_log, "%sGuessing start of match, REx%s `%s%.60s%s%s' against `%s%.*s%s%s'...\n", - PL_colors[4],PL_colors[5],PL_colors[0], + PL_colors[4], PL_colors[5], PL_colors[0], prog->precomp, PL_colors[1], (strlen(prog->precomp) > 60 ? "..." : ""), @@ -764,33 +764,33 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, */ strpos = t + 1; DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "Found /%s^%s/m at offset %ld, rescanning for anchored from offset %ld...\n", - PL_colors[0],PL_colors[1], (long)(strpos - i_strpos), (long)(strpos - i_strpos + prog->anchored_offset))); + PL_colors[0], PL_colors[1], (long)(strpos - i_strpos), (long)(strpos - i_strpos + prog->anchored_offset))); goto do_other_anchored; } /* We don't contradict the found floating substring. */ /* XXXX Why not check for STCLASS? */ s = t + 1; DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "Found /%s^%s/m at offset %ld...\n", - PL_colors[0],PL_colors[1], (long)(s - i_strpos))); + PL_colors[0], PL_colors[1], (long)(s - i_strpos))); goto set_useful; } /* Position contradicts check-string */ /* XXXX probably better to look for check-string than for "\n", so one should lower the limit for t? */ DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "Found /%s^%s/m, restarting lookup for check-string at offset %ld...\n", - PL_colors[0],PL_colors[1], (long)(t + 1 - i_strpos))); + PL_colors[0], PL_colors[1], (long)(t + 1 - i_strpos))); other_last = strpos = s = t + 1; goto restart; } t++; } DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "Did not find /%s^%s/m...\n", - PL_colors[0],PL_colors[1])); + PL_colors[0], PL_colors[1])); goto fail_finish; } else { DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "Starting position does not contradict /%s^%s/m...\n", - PL_colors[0],PL_colors[1])); + PL_colors[0], PL_colors[1])); } s = t; set_useful: @@ -814,7 +814,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, } DEBUG_EXECUTE_r( if (ml_anch) PerlIO_printf(Perl_debug_log, "Position at offset %ld does not contradict /%s^%s/m...\n", - (long)(strpos - i_strpos), PL_colors[0],PL_colors[1]); + (long)(strpos - i_strpos), PL_colors[0], PL_colors[1]); ); success_at_start: if (!(prog->reganch & ROPT_NAUGHTY) /* XXXX If strpos moved? */ @@ -923,7 +923,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, goto giveup; DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, "Looking for /%s^%s/m starting at offset %ld...\n", - PL_colors[0],PL_colors[1], (long)(t - i_strpos)) ); + PL_colors[0], PL_colors[1], (long)(t - i_strpos)) ); goto try_at_offset; } if (!(do_utf8 ? prog->float_utf8 : prog->float_substr)) /* Could have been deleted */ @@ -957,7 +957,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, BmUSEFUL(do_utf8 ? prog->check_utf8 : prog->check_substr) += 5; /* hooray */ fail: DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sMatch rejected by optimizer%s\n", - PL_colors[4],PL_colors[5])); + PL_colors[4], PL_colors[5])); return Nullch; } @@ -1742,7 +1742,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * reginitcolors(); PerlIO_printf(Perl_debug_log, "%sMatching REx%s `%s%*.*s%s%s' against `%s%.*s%s%s'\n", - PL_colors[4],PL_colors[5],PL_colors[0], + PL_colors[4], PL_colors[5], PL_colors[0], len0, len0, s0, PL_colors[1], len0 > 60 ? "..." : "", @@ -2009,7 +2009,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * if (last == NULL) { DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sCan't trim the tail, match fails (should not happen)%s\n", - PL_colors[4],PL_colors[5])); + PL_colors[4], PL_colors[5])); goto phooey; /* Should not happen! */ } dontbother = strend - last + prog->float_min_offset; @@ -2085,7 +2085,7 @@ got_it: phooey: DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sMatch failed%s\n", - PL_colors[4],PL_colors[5])); + PL_colors[4], PL_colors[5])); if (PL_reg_eval_set) restore_pos(aTHX_ 0); return 0; @@ -2142,7 +2142,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) SAVEDESTRUCTOR_X(restore_pos, 0); } if (!PL_reg_curpm) { - Newz(22,PL_reg_curpm, 1, PMOP); + Newz(22, PL_reg_curpm, 1, PMOP); #ifdef USE_ITHREADS { SV* repointer = newSViv(0); @@ -2188,7 +2188,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) if(PL_reg_start_tmp) Renew(PL_reg_start_tmp, PL_reg_start_tmpl, char*); else - New(22,PL_reg_start_tmp, PL_reg_start_tmpl, char*); + New(22, PL_reg_start_tmp, PL_reg_start_tmpl, char*); } /* XXXX What this code is doing here?!!! There should be no need @@ -2601,9 +2601,9 @@ S_regmatch(pTHX_ regnode *prog) DEBUG_TRIE_EXECUTE_r( PerlIO_printf( Perl_debug_log, - "%*s %sState: %4x, Base: %4x Accepted: %4x ", + "%*s %sState: %4"UVxf", Base: %4"UVxf", Accepted: %4"UVxf" ", REPORT_CODE_OFF + PL_regindent * 2, "", PL_colors[4], - state, base, accepted ); + (UV)state, (UV)base, (UV)accepted ); ); if ( base ) { @@ -2621,7 +2621,7 @@ S_regmatch(pTHX_ regnode *prog) uscan = foldbuf + UNISKIP( uvc ); } } else { - uvc = (U32)*uc; + uvc = (UV)*uc; len = 1; } @@ -2631,9 +2631,9 @@ S_regmatch(pTHX_ regnode *prog) state = 0; } DEBUG_TRIE_EXECUTE_r( - PerlIO_printf( Perl_debug_log, - "Charid:%3x CV:%4x After State: %4x%s\n", - charid, uvc, state, PL_colors[5] ); + PerlIO_printf( Perl_debug_log, + "Charid:%3x CV:%4"UVxf" After State: %4"UVxf"%s\n", + charid, uvc, (UV)state, PL_colors[5] ); ); } if ( !accepted ) { @@ -2666,9 +2666,9 @@ S_regmatch(pTHX_ regnode *prog) DEBUG_TRIE_EXECUTE_r( PerlIO_printf( Perl_debug_log, - "%*s %sState: %4x, Base: %4x Accepted: %4x ", + "%*s %sState: %4"UVxf", Base: %4"UVxf", Accepted: %4"UVxf" ", REPORT_CODE_OFF + PL_regindent * 2, "", PL_colors[4], - state, base, accepted ); + (UV)state, (UV)base, (UV)accepted ); ); if ( base ) { @@ -2687,8 +2687,8 @@ S_regmatch(pTHX_ regnode *prog) } DEBUG_TRIE_EXECUTE_r( PerlIO_printf( Perl_debug_log, - "Charid:%3x CV:%4x After State: %4x%s\n", - charid, uvc, state, PL_colors[5] ); + "Charid:%3x CV:%4"UVxf" After State: %4"UVxf"%s\n", + charid, uvc, (UV)state, PL_colors[5] ); ); } if ( !accepted ) { @@ -2718,7 +2718,7 @@ S_regmatch(pTHX_ regnode *prog) SV **tmp = av_fetch( trie->words, accept_buff[ 0 ].wordnum-1, 0 ); PerlIO_printf( Perl_debug_log, "%*s %sonly one match : #%d <%s>%s\n", - REPORT_CODE_OFF+PL_regindent*2, "",PL_colors[4], + REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4], accept_buff[ 0 ].wordnum, tmp ? SvPV_nolen( *tmp ) : "not compiled under -Dr", PL_colors[5] ); @@ -2731,21 +2731,21 @@ S_regmatch(pTHX_ regnode *prog) gotit = regmatch( scan + NEXT_OFF( scan ) ); } else { DEBUG_EXECUTE_r( - PerlIO_printf( Perl_debug_log,"%*s %sgot %d possible matches%s\n", - REPORT_CODE_OFF + PL_regindent * 2, "",PL_colors[4], accepted, + PerlIO_printf( Perl_debug_log,"%*s %sgot %"IVdf" possible matches%s\n", + REPORT_CODE_OFF + PL_regindent * 2, "", PL_colors[4], (IV)accepted, PL_colors[5] ); ); while ( !gotit && accepted-- ) { U32 best = 0; U32 cur; for( cur = 1 ; cur <= accepted ; cur++ ) { - DEBUG_TRIE_EXECUTE_r( - PerlIO_printf( Perl_debug_log, - "%*s %sgot %d (%d) as best, looking at %d (%d)%s\n", - REPORT_CODE_OFF + PL_regindent * 2, "", PL_colors[4], - best, accept_buff[ best ].wordnum, cur, - accept_buff[ cur ].wordnum, PL_colors[5] ); - ); + DEBUG_TRIE_EXECUTE_r( + PerlIO_printf( Perl_debug_log, + "%*s %sgot %"IVdf" (%d) as best, looking at %"IVdf" (%d)%s\n", + REPORT_CODE_OFF + PL_regindent * 2, "", PL_colors[4], + (IV)best, accept_buff[ best ].wordnum, (IV)cur, + accept_buff[ cur ].wordnum, PL_colors[5] ); + ); if ( accept_buff[ cur ].wordnum < accept_buff[ best ].wordnum ) best = cur; @@ -2753,7 +2753,7 @@ S_regmatch(pTHX_ regnode *prog) DEBUG_EXECUTE_r({ SV **tmp = av_fetch( trie->words, accept_buff[ best ].wordnum - 1, 0 ); PerlIO_printf( Perl_debug_log, "%*s %strying alternation #%d <%s> at 0x%p%s\n", - REPORT_CODE_OFF+PL_regindent*2, "",PL_colors[4], + REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4], accept_buff[best].wordnum, tmp ? SvPV_nolen( *tmp ) : "not compiled under -Dr",scan, PL_colors[5] ); @@ -4267,12 +4267,12 @@ yes_loud: DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, "%*s %scould match...%s\n", - REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4],PL_colors[5]) + REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4], PL_colors[5]) ); goto yes; yes_final: DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sMatch successful!%s\n", - PL_colors[4],PL_colors[5])); + PL_colors[4], PL_colors[5])); yes: #ifdef DEBUGGING PL_regindent--; @@ -4288,7 +4288,7 @@ no: DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, "%*s %sfailed...%s\n", - REPORT_CODE_OFF+PL_regindent*2, "",PL_colors[4],PL_colors[5]) + REPORT_CODE_OFF+PL_regindent*2, "", PL_colors[4], PL_colors[5]) ); goto do_no; no_final: diff --git a/toke.c b/toke.c index ef2345e..a4898a2 100644 --- a/toke.c +++ b/toke.c @@ -297,7 +297,7 @@ S_tokereport(pTHX_ const char* s, I32 rv) case TOKENTYPE_GVVAL: /* doesn't appear to be used */ break; case TOKENTYPE_IVAL: - Perl_sv_catpvf(aTHX_ report, "(ival=%"IVdf")", yylval.ival); + Perl_sv_catpvf(aTHX_ report, "(ival=%"IVdf")", (IV)yylval.ival); break; case TOKENTYPE_OPNUM: Perl_sv_catpvf(aTHX_ report, "(ival=op_%s)", @@ -314,7 +314,7 @@ S_tokereport(pTHX_ const char* s, I32 rv) Perl_sv_catpv(aTHX_ report, "(opval=null)"); break; } - Perl_sv_catpvf(aTHX_ report, " at line %d [", CopLINE(PL_curcop)); + Perl_sv_catpvf(aTHX_ report, " at line %"IVdf" [", (IV)CopLINE(PL_curcop)); if (s - PL_bufptr > 0) sv_catpvn(report, PL_bufptr, s - PL_bufptr); else {