summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numeric.c6
-rw-r--r--op.c10
-rw-r--r--pp_pack.c4
-rw-r--r--toke.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/numeric.c b/numeric.c
index 2970dad08a..0f353cffe8 100644
--- a/numeric.c
+++ b/numeric.c
@@ -151,7 +151,7 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_2 = UV_MAX / 2;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
char bit;
@@ -268,7 +268,7 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_16 = UV_MAX / 16;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
@@ -382,7 +382,7 @@ Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) {
NV value_nv = 0;
const UV max_div_8 = UV_MAX / 8;
- const bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ const bool allow_underscores = (bool)(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
for (; len-- && *s; s++) {
diff --git a/op.c b/op.c
index 72725386be..5d593f8edf 100644
--- a/op.c
+++ b/op.c
@@ -2324,7 +2324,7 @@ Perl_newUNOP(pTHX_ I32 type, I32 flags, OP *first)
unop->op_type = (OPCODE)type;
unop->op_ppaddr = PL_ppaddr[type];
unop->op_first = first;
- unop->op_flags = flags | OPf_KIDS;
+ unop->op_flags = (U8)(flags | OPf_KIDS);
unop->op_private = (U8)(1 | (flags >> 8));
unop = (UNOP*) CHECKOP(type, unop);
if (unop->op_next)
@@ -2346,7 +2346,7 @@ Perl_newBINOP(pTHX_ I32 type, I32 flags, OP *first, OP *last)
binop->op_type = (OPCODE)type;
binop->op_ppaddr = PL_ppaddr[type];
binop->op_first = first;
- binop->op_flags = flags | OPf_KIDS;
+ binop->op_flags = (U8)(flags | OPf_KIDS);
if (!last) {
last = first;
binop->op_private = (U8)(1 | (flags >> 8));
@@ -2643,7 +2643,7 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
j = rlen - 1;
else
cPVOPo->op_pv = (char*)Renew(tbl, 0x101+rlen-j, short);
- tbl[0x100] = rlen - j;
+ tbl[0x100] = (short)(rlen - j);
for (i=0; i < (I32)rlen - j; i++)
tbl[0x101+i] = r[j+i];
}
@@ -3625,7 +3625,7 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
logop->op_type = (OPCODE)type;
logop->op_ppaddr = PL_ppaddr[type];
logop->op_first = first;
- logop->op_flags = flags | OPf_KIDS;
+ logop->op_flags = (U8)(flags | OPf_KIDS);
logop->op_other = LINKLIST(other);
logop->op_private = (U8)(1 | (flags >> 8));
@@ -3676,7 +3676,7 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop)
logop->op_type = OP_COND_EXPR;
logop->op_ppaddr = PL_ppaddr[OP_COND_EXPR];
logop->op_first = first;
- logop->op_flags = flags | OPf_KIDS;
+ logop->op_flags = (U8)(flags | OPf_KIDS);
logop->op_private = (U8)(1 | (flags >> 8));
logop->op_other = LINKLIST(trueop);
logop->op_next = LINKLIST(falseop);
diff --git a/pp_pack.c b/pp_pack.c
index 92d0a36a55..24faef5325 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2987,7 +2987,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
ckWARN(WARN_PACK))
Perl_warner(aTHX_ packWARN(WARN_PACK),
"Character in 'c' format wrapped in pack");
- PUSH_BYTE(utf8, cur, aiv & 0xff);
+ PUSH_BYTE(utf8, cur, (U8)(aiv & 0xff));
}
break;
case 'C':
@@ -3004,7 +3004,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
ckWARN(WARN_PACK))
Perl_warner(aTHX_ packWARN(WARN_PACK),
"Character in 'C' format wrapped in pack");
- *cur++ = aiv & 0xff;
+ *cur++ = (char)(aiv & 0xff);
}
break;
case 'W': {
diff --git a/toke.c b/toke.c
index 890e6815e9..ba3fbb1a1a 100644
--- a/toke.c
+++ b/toke.c
@@ -446,7 +446,7 @@ S_missingterm(pTHX_ char *s)
#endif
) {
*tmpbuf = '^';
- tmpbuf[1] = toCTRL(PL_multi_close);
+ tmpbuf[1] = (char)toCTRL(PL_multi_close);
tmpbuf[2] = '\0';
s = tmpbuf;
}