summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-11-25 06:45:24 -0500
committerSteve Peters <steve@fisharerojo.org>2006-11-25 17:34:09 +0000
commit70685ca0840f6815bbaa22840c8fc8d5f39582b5 (patch)
tree5b50aca1ce7497ea646492c728e7d9f650a6f87d
parentdef4ed7dae237ef44df68de123257af258278ceb (diff)
downloadperl-70685ca0840f6815bbaa22840c8fc8d5f39582b5.tar.gz
smoke signs suppression
Message-ID: <45687324.3040102@iki.fi> p4raw-id: //depot/perl@29378
-rw-r--r--ext/re/re.xs8
-rw-r--r--iperlsys.h2
-rw-r--r--pp_hot.c8
-rw-r--r--regcomp.c22
-rw-r--r--regexec.c12
5 files changed, 27 insertions, 25 deletions
diff --git a/ext/re/re.xs b/ext/re/re.xs
index c93a0b44b5..8c6fbc1cc9 100644
--- a/ext/re/re.xs
+++ b/ext/re/re.xs
@@ -26,7 +26,11 @@ extern char* my_reg_stringify (pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *ha
extern regexp* my_regdupe (pTHX_ const regexp *r, CLONE_PARAMS *param);
#endif
-EXTERN_C const struct regexp_engine my_reg_engine = {
+EXTERN_C const struct regexp_engine my_reg_engine;
+
+END_EXTERN_C
+
+const struct regexp_engine my_reg_engine = {
my_regcomp,
my_regexec,
my_re_intuit_start,
@@ -38,8 +42,6 @@ EXTERN_C const struct regexp_engine my_reg_engine = {
#endif
};
-END_EXTERN_C
-
MODULE = re PACKAGE = re
void
diff --git a/iperlsys.h b/iperlsys.h
index bcce7197f9..59b2f9a35d 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -339,7 +339,7 @@ struct IPerlStdIOInfo
#define PerlSIO_set_cnt(f,c) PerlIOProc_abort()
#endif
#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE)
-#define PerlSIO_set_ptr(f,p) FILE_ptr(f) = (p)
+#define PerlSIO_set_ptr(f,p) FILE_ptr(f) = ((STDCHAR*)(p))
#else
#define PerlSIO_set_ptr(f,p) PerlIOProc_abort()
#endif
diff --git a/pp_hot.c b/pp_hot.c
index de2b1613f8..cdf83376d3 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1397,7 +1397,7 @@ play_it_again:
&& !SvROK(TARG)) /* Cannot trust since INTUIT cannot guess ^ */
goto yup;
}
- if (CALLREGEXEC(rx, (char*)s, (char *)strend, (char*)truebase, minmatch, TARG, (void*)gpos, r_flags))
+ if (CALLREGEXEC(rx, (char*)s, (char *)strend, (char*)truebase, minmatch, TARG, INT2PTR(void*, gpos), r_flags))
{
PL_curpm = pm;
if (dynpm->op_pmflags & PMf_ONCE)
@@ -1447,14 +1447,14 @@ play_it_again:
}
if (rx->startp[0] != -1) {
mg->mg_len = rx->endp[0];
- if (rx->startp[0] + rx->gofs == rx->endp[0])
+ if (rx->startp[0] + rx->gofs == (UV)rx->endp[0])
mg->mg_flags |= MGf_MINMATCH;
else
mg->mg_flags &= ~MGf_MINMATCH;
}
}
had_zerolen = (rx->startp[0] != -1
- && rx->startp[0] + rx->gofs == rx->endp[0]);
+ && rx->startp[0] + rx->gofs == (UV)rx->endp[0]);
PUTBACK; /* EVAL blocks may use stack */
r_flags |= REXEC_IGNOREPOS | REXEC_NOT_FIRST;
goto play_it_again;
@@ -1481,7 +1481,7 @@ play_it_again:
}
if (rx->startp[0] != -1) {
mg->mg_len = rx->endp[0];
- if (rx->startp[0] + rx->gofs == rx->endp[0])
+ if (rx->startp[0] + rx->gofs == (UV)rx->endp[0])
mg->mg_flags |= MGf_MINMATCH;
else
mg->mg_flags &= ~MGf_MINMATCH;
diff --git a/regcomp.c b/regcomp.c
index 8af528bfd7..0601033964 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4524,7 +4524,7 @@ reStudy:
the "real" pattern. */
DEBUG_OPTIMISE_r({
PerlIO_printf(Perl_debug_log,"minlen: %"IVdf" r->minlen:%"IVdf"\n",
- minlen, r->minlen);
+ (IV)minlen, (IV)r->minlen);
});
r->minlenret = minlen;
if (r->minlen < minlen)
@@ -8046,10 +8046,10 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val,
SV * const mysv_val=sv_newmortal();
DEBUG_PARSE_MSG("");
regprop(RExC_rx, mysv_val, val);
- PerlIO_printf(Perl_debug_log, "~ attach to %s (%d) offset to %d\n",
- SvPV_nolen_const(mysv_val),
- REG_NODE_NUM(val),
- val - scan
+ PerlIO_printf(Perl_debug_log, "~ attach to %s (%"IVdf") offset to %"IVdf"\n",
+ SvPV_nolen_const(mysv_val),
+ (IV)REG_NODE_NUM(val),
+ (IV)(val - scan)
);
});
if (reg_off_by_arg[OP(scan)]) {
@@ -8160,12 +8160,12 @@ Perl_regdump(pTHX_ const regexp *r)
PerlIO_putc(Perl_debug_log, ' ');
}
if (r->extflags & RXf_GPOS_SEEN)
- PerlIO_printf(Perl_debug_log, "GPOS:%"UVuf" ", r->gofs);
+ PerlIO_printf(Perl_debug_log, "GPOS:%"UVuf" ", (UV)r->gofs);
if (r->intflags & PREGf_SKIP)
PerlIO_printf(Perl_debug_log, "plus ");
if (r->intflags & PREGf_IMPLICIT)
PerlIO_printf(Perl_debug_log, "implicit ");
- PerlIO_printf(Perl_debug_log, "minlen %ld ", (long) r->minlen);
+ PerlIO_printf(Perl_debug_log, "minlen %"IVdf" ", (IV)r->minlen);
if (r->extflags & RXf_EVAL_SEEN)
PerlIO_printf(Perl_debug_log, "with eval ");
PerlIO_printf(Perl_debug_log, "\n");
@@ -9006,7 +9006,7 @@ S_put_byte(pTHX_ SV *sv, int c)
#define CLEAR_OPTSTART \
if (optstart) STMT_START { \
- DEBUG_OPTIMISE_r(PerlIO_printf(Perl_debug_log, " (%d nodes)\n", node - optstart)); \
+ DEBUG_OPTIMISE_r(PerlIO_printf(Perl_debug_log, " (%"IVdf" nodes)\n", (IV)(node - optstart))); \
optstart=NULL; \
} STMT_END
@@ -9110,8 +9110,8 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
);
if (trie->jump) {
U16 dist= trie->jump[word_idx+1];
- PerlIO_printf(Perl_debug_log, "(%u)\n",
- (dist ? this_trie + dist : next) - start);
+ PerlIO_printf(Perl_debug_log, "(%"UVuf")\n",
+ (UV)((dist ? this_trie + dist : next) - start));
if (dist) {
if (!nextbranch)
nextbranch= this_trie + trie->jump[0];
@@ -9159,7 +9159,7 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
}
CLEAR_OPTSTART;
#ifdef DEBUG_DUMPUNTIL
- PerlIO_printf(Perl_debug_log, "--- %d\n",indent);
+ PerlIO_printf(Perl_debug_log, "--- %d\n", (int)indent);
#endif
return node;
}
diff --git a/regexec.c b/regexec.c
index ecbebaca6e..fe1c0f39c0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -822,7 +822,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->intflags & PREGf_NAUGHTY) /* XXXX If strpos moved? */
@@ -879,8 +879,8 @@ 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: %d s: %d endpos: %d\n",
- (IV)start_shift, check_at - strbeg, s - strbeg, endpos - strbeg));
+ DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %"IVdf" s: %"IVdf" endpos: %"IVdf"\n",
+ (IV)start_shift, (IV)(check_at - strbeg), (IV)(s - strbeg), (IV)(endpos - strbeg)));
t = s;
s = find_byclass(prog, progi->regstclass, s, endpos, NULL);
@@ -1596,8 +1596,8 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
s = (char*)leftmost;
DEBUG_TRIE_EXECUTE_r({
PerlIO_printf(
- Perl_debug_log,"Matches word #%"UVxf" at position %d. Trying full pattern...\n",
- (UV)accepted_word, s - real_start
+ Perl_debug_log,"Matches word #%"UVxf" at position %"IVdf". Trying full pattern...\n",
+ (UV)accepted_word, (IV)(s - real_start)
);
});
if (!reginfo || regtry(reginfo, &s)) {
@@ -1728,7 +1728,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
}
}
else if (data) {
- reginfo.ganch = strbeg + (UV)data;
+ reginfo.ganch = strbeg + PTR2UV(data);
} else /* pos() not defined */
reginfo.ganch = strbeg;
}