si_ix=0;
for (;;)
{
- const int si_name_ix = si->si_type+1; /* -1 is a valid index */
- const char * const si_name = (si_name_ix>= sizeof(si_names)) ? "????" : si_names[si_name_ix];
+ const size_t si_name_ix = si->si_type+1; /* -1 is a valid index */
+ const char * const si_name = (si_name_ix >= sizeof(si_names)) ? "????" : si_names[si_name_ix];
I32 ix;
PerlIO_printf(Perl_debug_log, "STACK %"IVdf": %s\n",
(IV)si_ix, si_name);
SETERRNO(0,0);
if (shmctl(id, IPC_STAT, &shmds) == -1)
return -1;
- if (mpos < 0 || msize < 0 || mpos + msize > shmds.shm_segsz) {
+ if (mpos < 0 || msize < 0 || (size_t)mpos + msize > shmds.shm_segsz) {
SETERRNO(EFAULT,SS_ACCVIO); /* can't do as caller requested */
return -1;
}
if (! SvOK(mstr))
sv_setpvn(mstr, "", 0);
SvPV_force_nolen(mstr);
- mbuf = SvGROW(mstr, msize+1);
+ mbuf = SvGROW(mstr, (STRLEN)msize+1);
Copy(shm + mpos, mbuf, msize, char);
SvCUR_set(mstr, msize);
else {
matches++;
if (!del) {
- ch = (rlen == 0) ? comp :
+ ch = (rlen == 0) ? (I32)comp :
(comp - 0x100 < rlen) ?
tbl[comp+1] : tbl[0x100+rlen];
if ((UV)ch != pch) {
Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
{
dVAR;
- STRLEN srclen, len;
+ STRLEN srclen, len, uoffset;
const unsigned char *s = (const unsigned char *) SvPV_const(sv, srclen);
UV retnum = 0;
if (SvUTF8(sv))
(void) Perl_sv_utf8_downgrade(aTHX_ sv, TRUE);
- offset *= size; /* turn into bit offset */
- len = (offset + size + 7) / 8; /* required number of bytes */
+ uoffset = offset*size; /* turn into bit offset */
+ len = (uoffset + size + 7) / 8; /* required number of bytes */
if (len > srclen) {
if (size <= 8)
retnum = 0;
else {
- offset >>= 3; /* turn into byte offset */
+ uoffset >>= 3; /* turn into byte offset */
if (size == 16) {
- if ((STRLEN)offset >= srclen)
+ if (uoffset >= srclen)
retnum = 0;
else
- retnum = (UV) s[offset] << 8;
+ retnum = (UV) s[uoffset] << 8;
}
else if (size == 32) {
- if ((STRLEN)offset >= srclen)
+ if (uoffset >= srclen)
retnum = 0;
- else if ((STRLEN)(offset + 1) >= srclen)
+ else if (uoffset + 1 >= srclen)
retnum =
- ((UV) s[offset ] << 24);
- else if ((STRLEN)(offset + 2) >= srclen)
+ ((UV) s[uoffset ] << 24);
+ else if (uoffset + 2 >= srclen)
retnum =
- ((UV) s[offset ] << 24) +
- ((UV) s[offset + 1] << 16);
+ ((UV) s[uoffset ] << 24) +
+ ((UV) s[uoffset + 1] << 16);
else
retnum =
- ((UV) s[offset ] << 24) +
- ((UV) s[offset + 1] << 16) +
- ( s[offset + 2] << 8);
+ ((UV) s[uoffset ] << 24) +
+ ((UV) s[uoffset + 1] << 16) +
+ ( s[uoffset + 2] << 8);
}
#ifdef UV_IS_QUAD
else if (size == 64) {
if (ckWARN(WARN_PORTABLE))
Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
- if (offset >= srclen)
+ if (uoffset >= srclen)
retnum = 0;
- else if (offset + 1 >= srclen)
+ else if (uoffset + 1 >= srclen)
retnum =
- (UV) s[offset ] << 56;
- else if (offset + 2 >= srclen)
+ (UV) s[uoffset ] << 56;
+ else if (uoffset + 2 >= srclen)
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48);
- else if (offset + 3 >= srclen)
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48);
+ else if (uoffset + 3 >= srclen)
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40);
- else if (offset + 4 >= srclen)
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40);
+ else if (uoffset + 4 >= srclen)
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40) +
- ((UV) s[offset + 3] << 32);
- else if (offset + 5 >= srclen)
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40) +
+ ((UV) s[uoffset + 3] << 32);
+ else if (uoffset + 5 >= srclen)
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40) +
- ((UV) s[offset + 3] << 32) +
- ( s[offset + 4] << 24);
- else if (offset + 6 >= srclen)
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40) +
+ ((UV) s[uoffset + 3] << 32) +
+ ( s[uoffset + 4] << 24);
+ else if (uoffset + 6 >= srclen)
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40) +
- ((UV) s[offset + 3] << 32) +
- ((UV) s[offset + 4] << 24) +
- ((UV) s[offset + 5] << 16);
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40) +
+ ((UV) s[uoffset + 3] << 32) +
+ ((UV) s[uoffset + 4] << 24) +
+ ((UV) s[uoffset + 5] << 16);
else
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40) +
- ((UV) s[offset + 3] << 32) +
- ((UV) s[offset + 4] << 24) +
- ((UV) s[offset + 5] << 16) +
- ( s[offset + 6] << 8);
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40) +
+ ((UV) s[uoffset + 3] << 32) +
+ ((UV) s[uoffset + 4] << 24) +
+ ((UV) s[uoffset + 5] << 16) +
+ ( s[uoffset + 6] << 8);
}
#endif
}
}
else if (size < 8)
- retnum = (s[offset >> 3] >> (offset & 7)) & ((1 << size) - 1);
+ retnum = (s[uoffset >> 3] >> (uoffset & 7)) & ((1 << size) - 1);
else {
- offset >>= 3; /* turn into byte offset */
+ uoffset >>= 3; /* turn into byte offset */
if (size == 8)
- retnum = s[offset];
+ retnum = s[uoffset];
else if (size == 16)
retnum =
- ((UV) s[offset] << 8) +
- s[offset + 1];
+ ((UV) s[uoffset] << 8) +
+ s[uoffset + 1];
else if (size == 32)
retnum =
- ((UV) s[offset ] << 24) +
- ((UV) s[offset + 1] << 16) +
- ( s[offset + 2] << 8) +
- s[offset + 3];
+ ((UV) s[uoffset ] << 24) +
+ ((UV) s[uoffset + 1] << 16) +
+ ( s[uoffset + 2] << 8) +
+ s[uoffset + 3];
#ifdef UV_IS_QUAD
else if (size == 64) {
if (ckWARN(WARN_PORTABLE))
Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
"Bit vector size > 32 non-portable");
retnum =
- ((UV) s[offset ] << 56) +
- ((UV) s[offset + 1] << 48) +
- ((UV) s[offset + 2] << 40) +
- ((UV) s[offset + 3] << 32) +
- ((UV) s[offset + 4] << 24) +
- ((UV) s[offset + 5] << 16) +
- ( s[offset + 6] << 8) +
- s[offset + 7];
+ ((UV) s[uoffset ] << 56) +
+ ((UV) s[uoffset + 1] << 48) +
+ ((UV) s[uoffset + 2] << 40) +
+ ((UV) s[uoffset + 3] << 32) +
+ ((UV) s[uoffset + 4] << 24) +
+ ((UV) s[uoffset + 5] << 16) +
+ ( s[uoffset + 6] << 8) +
+ s[uoffset + 7];
}
#endif
}
STRLEN rightlen;
register const char *lc;
register const char *rc;
- register I32 len;
- I32 lensave;
+ register STRLEN len;
+ STRLEN lensave;
const char *lsave;
const char *rsave;
const bool left_utf = DO_UTF8(left);
const bool right_utf = DO_UTF8(right);
- I32 needlen = 0;
+ STRLEN needlen = 0;
if (left_utf && !right_utf)
sv_utf8_upgrade(right);
}
else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) {
dc = SvPV_force_nomg_nolen(sv);
- if (SvLEN(sv) < (STRLEN)(len + 1)) {
- dc = SvGROW(sv, (STRLEN)(len + 1));
+ if (SvLEN(sv) < len + 1) {
+ dc = SvGROW(sv, len + 1);
(void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1);
}
if (optype != OP_BIT_AND && (left_utf || right_utf))
dc = SvGROW(sv, leftlen + rightlen + 1);
}
else {
- needlen = ((optype == OP_BIT_AND)
- ? len : (leftlen > rightlen ? leftlen : rightlen));
+ needlen = optype == OP_BIT_AND
+ ? len : (leftlen > rightlen ? leftlen : rightlen);
Newxz(dc, needlen + 1, char);
sv_usepvn_flags(sv, dc, needlen, SV_HAS_TRAILING_NUL);
dc = SvPVX(sv); /* sv_usepvn() calls Renew() */
else
#ifdef LIBERAL
if (len >= sizeof(long)*4 &&
- !((long)dc % sizeof(long)) &&
- !((long)lc % sizeof(long)) &&
- !((long)rc % sizeof(long))) /* It's almost always aligned... */
+ !((unsigned long)dc % sizeof(long)) &&
+ !((unsigned long)lc % sizeof(long)) &&
+ !((unsigned long)rc % sizeof(long))) /* It's almost always aligned... */
{
- const I32 remainder = len % (sizeof(long)*4);
+ const STRLEN remainder = len % (sizeof(long)*4);
len /= (sizeof(long)*4);
dl = (long*)dc;
*dc++ = *lc++ | *rc++;
mop_up:
len = lensave;
- if (rightlen > (STRLEN)len)
+ if (rightlen > len)
sv_catpvn(sv, rsave + len, rightlen - len);
else if (leftlen > (STRLEN)len)
sv_catpvn(sv, lsave + len, leftlen - len);
if (HvARRAY(sv) && HvKEYS(sv)) {
/* Show distribution of HEs in the ARRAY */
int freq[200];
-#define FREQ_MAX (sizeof freq / sizeof freq[0] - 1)
+#define FREQ_MAX ((int)(sizeof freq / sizeof freq[0] - 1))
int i;
int max = 0;
U32 pow2 = 2, keys = HvKEYS(sv);
char smallbuf[128];
char *tmpbuf;
- if (len + 3 < sizeof (smallbuf))
+ if (len + 3 < (I32)sizeof (smallbuf))
tmpbuf = smallbuf;
else
Newx(tmpbuf, len+3, char);
#ifdef PERL_MALLOC_WRAP
#define MEM_WRAP_CHECK(n,t) MEM_WRAP_CHECK_1(n,t,PL_memory_wrap)
#define MEM_WRAP_CHECK_1(n,t,a) \
- (void)(sizeof(t) > 1 && (n) > ((MEM_SIZE)~0)/sizeof(t) && (Perl_croak_nocontext(a),0))
+ (void)(sizeof(t) > 1 && (MEM_SIZE)(n) > ((MEM_SIZE)~0)/sizeof(t) && (Perl_croak_nocontext(a),0))
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > (MEM_SIZE)~0 - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (Perl_croak_nocontext(PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))
use ExtUtils::Constant::Utils qw(C_stringify);
use ExtUtils::Constant::XS qw(%XS_TypeSet);
-$VERSION = '0.02';
+$VERSION = '0.03';
@ISA = 'ExtUtils::Constant::XS';
%type_to_struct =
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
- if (hv_exists(${c_subname}_missing, s, SvUTF8(sv) ? -(I32)len : len)) {
+ if (hv_exists(${c_subname}_missing, s, SvUTF8(sv) ? -(I32)len : (I32)len)) {
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
", used", sv);
} else {
s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf,
s, strend, ':', &i);
s++;
- if (i >= sizeof tmpbuf /* too long -- assume the worst */
+ if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */
|| *tmpbuf != '/'
|| (PerlLIO_stat(tmpbuf, &st) == 0 && (st.st_mode & 2)) ) {
MgTAINTEDDIR_on(mg);
if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) {
key = SvPV_const(sv, keylen);
lexname = newSVpvn_share(key,
- SvUTF8(sv) ? -(I32)keylen : keylen,
+ SvUTF8(sv) ? -(I32)keylen : (I32)keylen,
0);
SvREFCNT_dec(sv);
*svp = lexname;
break;
key = SvPV_const(*svp, keylen);
if (!hv_fetch(GvHV(*fields), key,
- SvUTF8(*svp) ? -(I32)keylen : keylen, FALSE))
+ SvUTF8(*svp) ? -(I32)keylen : (I32)keylen, FALSE))
{
Perl_croak(aTHX_ "No such class field \"%s\" "
"in variable %s of type %s",
svp = cSVOPx_svp(key_op);
key = SvPV_const(*svp, keylen);
if (!hv_fetch(GvHV(*fields), key,
- SvUTF8(*svp) ? -(I32)keylen : keylen, FALSE))
+ SvUTF8(*svp) ? -(I32)keylen : (I32)keylen, FALSE))
{
Perl_croak(aTHX_ "No such class field \"%s\" "
"in variable %s of type %s",
/* Initial space prevents this variable from being inserted in config.sh */
# define LOCAL_PATCH_COUNT \
- (sizeof(local_patches)/sizeof(local_patches[0])-2)
+ ((int)(sizeof(local_patches)/sizeof(local_patches[0])-2))
/* the old terms of reference, add them only when explicitly included */
#define PATCHLEVEL PERL_VERSION
PerlIO_printf(PerlIO_stdout(),
"\n(with %d registered patch%s, "
"see perl -V for more detail)",
- (int)LOCAL_PATCH_COUNT,
+ LOCAL_PATCH_COUNT,
(LOCAL_PATCH_COUNT!=1) ? "es" : "");
#endif
SSize_t avail = PerlIO_get_cnt(f);
SSize_t take = 0;
if (avail > 0)
- take = ((SSize_t)count < avail) ? count : avail;
+ take = ((SSize_t)count < avail) ? (SSize_t)count : avail;
if (take > 0) {
STDCHAR *ptr = PerlIO_get_ptr(f);
Copy(ptr, buf, take, STDCHAR);
for ( ; anum && (unsigned long)tmps % sizeof(long); anum--, tmps++)
*tmps = ~*tmps;
tmpl = (long*)tmps;
- for ( ; anum >= sizeof(long); anum -= sizeof(long), tmpl++)
+ for ( ; anum >= (I32)sizeof(long); anum -= (I32)sizeof(long), tmpl++)
*tmpl = ~*tmpl;
tmps = (U8*)tmpl;
}
register SV *dstr;
register const char *m;
I32 iters = 0;
- const STRLEN slen = do_utf8 ? utf8_length((U8*)s, (U8*)strend) : (strend - s);
+ const STRLEN slen = do_utf8 ? utf8_length((U8*)s, (U8*)strend) : (STRLEN)(strend - s);
I32 maxiters = slen + 10;
const char *orig;
const I32 origlimit = limit;
const char *got_p;
const char *prune_from = NULL;
bool read_from_cache = FALSE;
+ STRLEN umaxlen;
+
+ assert(maxlen >= 0);
+ umaxlen = maxlen;
/* I was having segfault trouble under Linux 2.2.5 after a
parse error occured. (Had to hack around it with a test
const char *cache_p = SvPV(cache, cache_len);
STRLEN take = 0;
- if (maxlen) {
+ if (umaxlen) {
/* Running in block mode and we have some cached data already.
*/
- if (cache_len >= maxlen) {
+ if (cache_len >= umaxlen) {
/* In fact, so much data we don't even need to call
filter_read. */
- take = maxlen;
+ take = umaxlen;
}
} else {
const char *const first_nl = memchr(cache_p, '\n', cache_len);
}
sv_catsv(buf_sv, cache);
- if (maxlen) {
- maxlen -= cache_len;
+ if (umaxlen) {
+ umaxlen -= cache_len;
}
SvOK_off(cache);
read_from_cache = TRUE;
if(SvOK(upstream)) {
got_p = SvPV(upstream, got_len);
- if (maxlen) {
- if (got_len > maxlen) {
- prune_from = got_p + maxlen;
+ if (umaxlen) {
+ if (got_len > umaxlen) {
+ prune_from = got_p + umaxlen;
}
} else {
const char *const first_nl = memchr(got_p, '\n', got_len);
SV *cache = (SV *)IoFMT_GV(datasv);
if (!cache) {
- IoFMT_GV(datasv) = (GV*) (cache = newSV(got_len - maxlen));
+ IoFMT_GV(datasv) = (GV*) (cache = newSV(got_len - umaxlen));
} else if (SvOK(cache)) {
/* Cache should be empty. */
assert(!SvCUR(cache));
STRLEN keylen;
const char * const key = SvPV_const(keysv, keylen);
SAVEDELETE(hv, savepvn(key,keylen),
- SvUTF8(keysv) ? -(I32)keylen : keylen);
+ SvUTF8(keysv) ? -(I32)keylen : (I32)keylen);
} else
save_helem(hv, keysv, svp);
}
SP = ORIGMARK;
if (did_pipes) {
int errkid;
- int n = 0, n1;
+ unsigned n = 0;
+ SSize_t n1;
while (n < sizeof(int)) {
n1 = PerlLIO_read(pp[0],
}
if (o->flags & ANYOF_CLASS)
- for (i = 0; i < sizeof(anyofs)/sizeof(char*); i++)
+ for (i = 0; i < (int)(sizeof(anyofs)/sizeof(char*)); i++)
if (ANYOF_CLASS_TEST(o,i))
sv_catpv(sv, anyofs[i]);
);
}
DEBUG_EXECUTE_r(
- if ((I32)(*PL_reglastparen + 1) <= rex->nparens) {
+ if (*PL_reglastparen + 1 <= rex->nparens) {
PerlIO_printf(Perl_debug_log,
" restoring \\%"IVdf"..\\%"IVdf" to undef\n",
(IV)(*PL_reglastparen + 1), (IV)rex->nparens);
* building DynaLoader will fail:
* "Error: '*' not in typemap in DynaLoader.xs, line 164"
* --jhi */
- for (i = *PL_reglastparen + 1; i <= rex->nparens; i++) {
+ for (i = *PL_reglastparen + 1; (U32)i <= rex->nparens; i++) {
if (i > PL_regsize)
PL_regstartp[i] = -1;
PL_regendp[i] = -1;
sv_uni_display(dsv, sv, 60, UNI_DISPLAY_REGEX) :
strpos;
const int len = PL_reg_match_utf8 ?
- strlen(s) : strend - strpos;
+ (int)strlen(s) : strend - strpos;
if (!PL_colorset)
reginitcolors();
if (PL_reg_match_utf8)
LOAD_UTF8_CHARCLASS_ALNUM();
while (s + (uskip = UTF8SKIP(s)) <= strend) {
if (tmp == !(OP(c) == BOUND ?
- swash_fetch(PL_utf8_alnum, (U8*)s, do_utf8) :
+ (bool)swash_fetch(PL_utf8_alnum, (U8*)s, do_utf8) :
isALNUM_LC_utf8((U8*)s)))
{
tmp = !tmp;
LOAD_UTF8_CHARCLASS_ALNUM();
while (s + (uskip = UTF8SKIP(s)) <= strend) {
if (tmp == !(OP(c) == NBOUND ?
- swash_fetch(PL_utf8_alnum, (U8*)s, do_utf8) :
+ (bool)swash_fetch(PL_utf8_alnum, (U8*)s, do_utf8) :
isALNUM_LC_utf8((U8*)s)))
tmp = !tmp;
else if ((!reginfo || regtry(reginfo, s)))
? pv_uni_display(dsv0, (U8*)prog->precomp, prog->prelen, 60,
UNI_DISPLAY_REGEX)
: prog->precomp;
- const int len0 = UTF ? SvCUR(dsv0) : prog->prelen;
+ const int len0 = UTF ? (int)SvCUR(dsv0) : prog->prelen;
const char * const s1 = do_utf8 ? sv_uni_display(dsv1, sv, 60,
UNI_DISPLAY_REGEX) : startpos;
- const int len1 = do_utf8 ? SvCUR(dsv1) : strend - startpos;
+ const int len1 = do_utf8 ? (int)SvCUR(dsv1) : strend - startpos;
if (!PL_colorset)
reginitcolors();
PerlIO_printf(Perl_debug_log,
len0 = UTF ? SvCUR(dsv0) : SvCUR(prop);
s1 = UTF ?
sv_uni_display(dsv1, sv, 60, UNI_DISPLAY_REGEX) : s;
- len1 = UTF ? SvCUR(dsv1) : strend - s;
+ len1 = UTF ? (int)SvCUR(dsv1) : strend - s;
PerlIO_printf(Perl_debug_log,
"Matching stclass \"%*.*s\" against \"%*.*s\"\n",
len0, len0, s0,
pv_uni_display(PERL_DEBUG_PAD(0), (U8*)(locinput - pref_len),
pref0_len, 60, UNI_DISPLAY_REGEX) :
locinput - pref_len;
- const int len0 = do_utf8 ? strlen(s0) : pref0_len;
+ const int len0 = do_utf8 ? (int)strlen(s0) : pref0_len;
const char * const s1 = do_utf8 && OP(scan) != CANY ?
pv_uni_display(PERL_DEBUG_PAD(1),
(U8*)(locinput - pref_len + pref0_len),
pref_len - pref0_len, 60, UNI_DISPLAY_REGEX) :
locinput - pref_len + pref0_len;
- const int len1 = do_utf8 ? strlen(s1) : pref_len - pref0_len;
+ const int len1 = do_utf8 ? (int)strlen(s1) : pref_len - pref0_len;
const char * const s2 = do_utf8 && OP(scan) != CANY ?
pv_uni_display(PERL_DEBUG_PAD(2), (U8*)locinput,
PL_regeol - locinput, 60, UNI_DISPLAY_REGEX) :
locinput;
- const int len2 = do_utf8 ? strlen(s2) : l;
+ const int len2 = do_utf8 ? (int)strlen(s2) : l;
PerlIO_printf(Perl_debug_log,
"%4"IVdf" <%s%.*s%s%s%.*s%s%s%s%.*s%s>%*s|%3"IVdf":%*s%s\n",
(IV)(locinput - PL_bostr),
if (do_utf8) {
LOAD_UTF8_CHARCLASS_ALNUM();
if (!(OP(scan) == ALNUM
- ? swash_fetch(PL_utf8_alnum, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_alnum, (U8*)locinput, do_utf8)
: isALNUM_LC_utf8((U8*)locinput)))
{
sayNO;
if (do_utf8) {
LOAD_UTF8_CHARCLASS_ALNUM();
if (OP(scan) == NALNUM
- ? swash_fetch(PL_utf8_alnum, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_alnum, (U8*)locinput, do_utf8)
: isALNUM_LC_utf8((U8*)locinput))
{
sayNO;
if (UTF8_IS_CONTINUED(nextchr)) {
LOAD_UTF8_CHARCLASS_SPACE();
if (!(OP(scan) == SPACE
- ? swash_fetch(PL_utf8_space, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_space, (U8*)locinput, do_utf8)
: isSPACE_LC_utf8((U8*)locinput)))
{
sayNO;
if (do_utf8) {
LOAD_UTF8_CHARCLASS_SPACE();
if (OP(scan) == NSPACE
- ? swash_fetch(PL_utf8_space, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_space, (U8*)locinput, do_utf8)
: isSPACE_LC_utf8((U8*)locinput))
{
sayNO;
if (do_utf8) {
LOAD_UTF8_CHARCLASS_DIGIT();
if (!(OP(scan) == DIGIT
- ? swash_fetch(PL_utf8_digit, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_digit, (U8*)locinput, do_utf8)
: isDIGIT_LC_utf8((U8*)locinput)))
{
sayNO;
if (do_utf8) {
LOAD_UTF8_CHARCLASS_DIGIT();
if (OP(scan) == NDIGIT
- ? swash_fetch(PL_utf8_digit, (U8*)locinput, do_utf8)
+ ? (bool)swash_fetch(PL_utf8_digit, (U8*)locinput, do_utf8)
: isDIGIT_LC_utf8((U8*)locinput))
{
sayNO;
#define SCOPE_SAVES_SIGNAL_MASK 0
#endif
-#define SSCHECK(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow()
-#define SSGROW(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow_cnt(need)
+#define SSCHECK(need) if (PL_savestack_ix + (I32)(need) > PL_savestack_max) savestack_grow()
+#define SSGROW(need) if (PL_savestack_ix + (I32)(need) > PL_savestack_max) savestack_grow_cnt(need)
#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i))
#define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i))
#define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p))
*
* - jik 9/25/96
*/
- if (!(cnt < sizeof(buf) && PerlIO_eof(fp)))
+ if (!(cnt < (I32)sizeof(buf) && PerlIO_eof(fp)))
goto screamer2;
}
SvREFCNT(&PL_sv_no) = (~(U32)0)/2;
SvFLAGS(&PL_sv_no) = SVp_IOK|SVf_IOK|SVp_NOK|SVf_NOK
|SVp_POK|SVf_POK|SVf_READONLY|SVt_PVNV;
- SvPV_set(&PL_sv_no, SAVEPVN(PL_No, 0));
+ SvPV_set(&PL_sv_no, savepvn(PL_No, 0));
SvCUR_set(&PL_sv_no, 0);
SvLEN_set(&PL_sv_no, 1);
SvIV_set(&PL_sv_no, 0);
SvREFCNT(&PL_sv_yes) = (~(U32)0)/2;
SvFLAGS(&PL_sv_yes) = SVp_IOK|SVf_IOK|SVp_NOK|SVf_NOK
|SVp_POK|SVf_POK|SVf_READONLY|SVt_PVNV;
- SvPV_set(&PL_sv_yes, SAVEPVN(PL_Yes, 1));
+ SvPV_set(&PL_sv_yes, savepvn(PL_Yes, 1));
SvCUR_set(&PL_sv_yes, 1);
SvLEN_set(&PL_sv_yes, 2);
SvIV_set(&PL_sv_yes, 1);
or if it didn't end, or if we see a newline
*/
- if (len >= sizeof PL_tokenbuf)
+ if (len >= (I32)sizeof PL_tokenbuf)
Perl_croak(aTHX_ "Excessively long <> operator");
if (s >= end)
Perl_croak(aTHX_ "Unterminated <> operator");
type value; \
char c[sizeof(type)]; \
} u; \
- register I32 i; \
- register I32 s = 0; \
+ register U32 i; \
+ register U32 s = 0; \
for (i = 0; i < sizeof(u.c); i++, s += 8) { \
u.c[i] = (n >> s) & 0xFF; \
} \
type value; \
char c[sizeof(type)]; \
} u; \
- register I32 i; \
- register I32 s = 0; \
+ register U32 i; \
+ register U32 s = 0; \
u.value = n; \
n = 0; \
for (i = 0; i < sizeof(u.c); i++, s += 8) { \
type value; \
char c[sizeof(type)]; \
} u; \
- register I32 i; \
- register I32 s = 8*(sizeof(u.c)-1); \
+ register U32 i; \
+ register U32 s = 8*(sizeof(u.c)-1); \
for (i = 0; i < sizeof(u.c); i++, s -= 8) { \
u.c[i] = (n >> s) & 0xFF; \
} \
type value; \
char c[sizeof(type)]; \
} u; \
- register I32 i; \
- register I32 s = 8*(sizeof(u.c)-1); \
+ register U32 i; \
+ register U32 s = 8*(sizeof(u.c)-1); \
u.value = n; \
n = 0; \
for (i = 0; i < sizeof(u.c); i++, s -= 8) { \
/* If we managed to get status pipe check for exec fail */
if (did_pipes && pid > 0) {
int errkid;
- int n = 0, n1;
+ unsigned n = 0;
+ SSize_t n1;
while (n < sizeof(int)) {
n1 = PerlLIO_read(pp[0],
PL_forkprocess = pid;
if (did_pipes && pid > 0) {
int errkid;
- int n = 0, n1;
+ unsigned n = 0;
+ SSize_t n1;
while (n < sizeof(int)) {
n1 = PerlLIO_read(pp[0],