Race condition fix in threads.pm
[p5sagit/p5-mst-13.2.git] / regexec.c
index bfd81f8..1a86e49 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -525,7 +525,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
             end_point= HOP3(strend, -srch_end_shift, strbeg);
        }
        DEBUG_OPTIMISE_r({
-            PerlIO_printf(Perl_debug_log, "fbm_instr len=%"IVdf" str=<%.*s>\n", 
+            PerlIO_printf(Perl_debug_log, "fbm_instr len=%d str=<%.*s>\n", 
                 (int)(end_point - start_point),
                 (int)(end_point - start_point), 
                 start_point);
@@ -717,7 +717,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
     }
 
     
-    t= HOP3( s, -prog->check_offset_max, (prog->check_offset_max<0) ? strend : strpos);  
+    t= (char*)HOP3( s, -prog->check_offset_max, (prog->check_offset_max<0) ? strend : strpos);
         
     DEBUG_OPTIMISE_r(
         PerlIO_printf(Perl_debug_log, 
@@ -733,7 +733,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
 
     if (s - strpos > prog->check_offset_max  /* signed-corrected t > strpos */
         && (!do_utf8
-           || ((t = (char*)reghopmaybe3((U8*)s, -prog->check_offset_max, (prog->check_offset_max<0) ? strend : strpos))
+           || ((t = (char*)reghopmaybe3((U8*)s, -prog->check_offset_max, (U8*) ((prog->check_offset_max<0) ? strend : strpos)))
                 && t > strpos))) 
     {
        /* Fixed substring is found far enough so that the match
@@ -867,7 +867,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
         else 
             endpos= strend;
                    
-        DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %"IVdf" s: %"IVdf" endpos: %"IVdf"\n",
+        DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %d s: %d endpos: %d\n",
                       start_shift,check_at-strbeg,s-strbeg,endpos-strbeg));
        
        t = s;