if (--items == 0) {
/* Finished. */
- HvTOTALKEYS(hv) -= HvPLACEHOLDERS(hv);
+ HvTOTALKEYS(hv) -= (IV)HvPLACEHOLDERS(hv);
if (HvKEYS(hv) == 0)
HvHASKFLAGS_off(hv);
HvPLACEHOLDERS(hv) = 0;
Perl_mg_get(pTHX_ SV *sv)
{
const I32 mgs_ix = SSNEW(sizeof(MGS));
- const bool was_temp = SvTEMP(sv);
+ const bool was_temp = (bool)SvTEMP(sv);
int new = 0;
MAGIC *newmg, *head, *cur, *mg;
/* guard against sv having being freed midway by holding a private
o->op_flags |= flags;
o = CHECKOP(type, o);
- if (o->op_type != type)
+ if (o->op_type != (unsigned)type)
return o;
return fold_constants(o);
if (!last)
return first;
- if (first->op_type != type
+ if (first->op_type != (unsigned)type
|| (type == OP_LIST && (first->op_flags & OPf_PARENS)))
{
return newLISTOP(type, 0, first, last);
if (!last)
return (OP*)first;
- if (first->op_type != type)
+ if (first->op_type != (unsigned)type)
return prepend_elem(type, (OP*)first, (OP*)last);
- if (last->op_type != type)
+ if (last->op_type != (unsigned)type)
return append_elem(type, (OP*)first, (OP*)last);
first->op_last->op_sibling = last->op_first;
if (!last)
return first;
- if (last->op_type == type) {
+ if (last->op_type == (unsigned)type) {
if (type == OP_LIST) { /* already a PUSHMARK there */
first->op_sibling = ((LISTOP*)last)->op_first->op_sibling;
((LISTOP*)last)->op_first->op_sibling = first;
val &= 0xff;
}
*s += retlen;
- return val;
+ return (U8)val;
}
#define SHIFT_BYTE(utf8, s, strend, datumtype) ((utf8) ? \
bad |= 2;
val &= 0xff;
}
- *(U8 *)buf++ = val;
+ *(U8 *)buf++ = (U8)val;
}
/* We have enough characters for the buffer. Did we have problems ? */
if (bad) {
GROWING(0, cat, start, cur, len+1);
end = start+SvLEN(cat)-1;
}
- *(U8 *) cur++ = auv;
+ *(U8 *) cur++ = (U8)auv;
}
}
break;
if (SvMAGICAL(av)) {
MEXTEND(SP, max);
p2 = SP;
- for (i=0; i < (U32)max; i++) {
+ for (i=0; i < max; i++) {
SV **svp = av_fetch(av, i, FALSE);
*SP++ = (svp) ? *svp : Nullsv;
}
read_target = sv_newmortal();
SvUPGRADE(read_target, SVt_PV);
- buffer = SvGROW(read_target, length + 1);
+ buffer = SvGROW(read_target, (STRLEN)(length + 1));
}
if (PL_op->op_type == OP_SYSREAD) {
}
u = utf8_to_uvchr((U8*)s, 0);
if (u < 256) {
- unsigned char c = u & 0xFF;
+ unsigned char c = (unsigned char)u & 0xFF;
if (!ok && (flags & UNI_DISPLAY_BACKSLASH)) {
switch (c) {
case '\n':
if (strEQ(scriptname, "-"))
dosearch = 0;
if (dosearch) { /* Look in '.' first. */
- char *cur = scriptname;
+ const char *cur = scriptname;
#ifdef SEARCH_EXTS
if ((curext = strrchr(scriptname,'.'))) /* possible current ext */
while (ext[i])