summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-10-24 22:35:51 -0600
committerKarl Williamson <public@khwilliamson.com>2013-10-24 23:00:29 -0600
commitb54f893dc956463c59f2f0ee0ec913515bacd4c1 (patch)
tree9d32f0c20aedc8dfbc3578d2e5c49d69dc2cee6d
parentd4fcb1dc97692eaf7376c38783103c51b664ffc5 (diff)
downloadperl-b54f893dc956463c59f2f0ee0ec913515bacd4c1.tar.gz
Silence some Win32 compiler warnings
These get rid of some "possible loss of data" warnings
-rw-r--r--pp.c2
-rw-r--r--toke.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index 486146dbea..f3281f3f5c 100644
--- a/pp.c
+++ b/pp.c
@@ -5982,7 +5982,7 @@ PP(pp_coreargs)
const bool constr = PL_op->op_private & whicharg;
PUSHs(S_rv2gv(aTHX_
svp && *svp ? *svp : &PL_sv_undef,
- constr, CopHINTS_get(PL_curcop) & HINT_STRICT_REFS,
+ constr, cBOOL(CopHINTS_get(PL_curcop) & HINT_STRICT_REFS),
!constr
));
}
diff --git a/toke.c b/toke.c
index 0f169a2b62..2ed27a9dee 100644
--- a/toke.c
+++ b/toke.c
@@ -767,8 +767,11 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
parser->linestart = SvPVX(parser->linestr);
parser->bufend = parser->bufptr + SvCUR(parser->linestr);
parser->last_lop = parser->last_uni = NULL;
- parser->lex_flags = flags & (LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES
- |LEX_DONT_CLOSE_RSFP);
+
+ assert(FITS_IN_8_BITS(LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES
+ |LEX_DONT_CLOSE_RSFP));
+ parser->lex_flags = (U8) (flags & (LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES
+ |LEX_DONT_CLOSE_RSFP));
parser->in_pod = parser->filtered = 0;
}
@@ -4791,7 +4794,7 @@ Perl_yylex(pTHX)
char *d;
STRLEN len;
bool bof = FALSE;
- const bool saw_infix_sigil = PL_parser->saw_infix_sigil;
+ const bool saw_infix_sigil = cBOOL(PL_parser->saw_infix_sigil);
U8 formbrack = 0;
U32 fake_eof = 0;