Silence 5 "possible loss of data" warnings from VC6
Steve Hay [Tue, 24 Apr 2007 12:17:00 +0000 (12:17 +0000)]
p4raw-id: //depot/perl@31055

ext/Devel/Peek/Peek.xs
toke.c
utf8.c

index a88d231..e1c62c3 100644 (file)
@@ -348,7 +348,7 @@ PPCODE:
     PL_dumpindent = 2;
     do_sv_dump(0, Perl_debug_log, sv, 0, lim,
               (bool)(dumpop && SvTRUE(dumpop)), pv_lim);
-    PL_dumpindent = save_dumpindent;
+    PL_dumpindent = (U16)save_dumpindent;
 }
 
 void
@@ -368,7 +368,7 @@ PPCODE:
        do_sv_dump(0, Perl_debug_log, ST(i), 0, lim,
                   (bool)(dumpop && SvTRUE(dumpop)), pv_lim);
     }
-    PL_dumpindent = save_dumpindent;
+    PL_dumpindent = (U16)save_dumpindent;
 }
 
 void
diff --git a/toke.c b/toke.c
index 8599fef..c7534a6 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1629,7 +1629,7 @@ S_sublex_start(pTHX)
     }
 
     PL_sublex_info.super_state = PL_lex_state;
-    PL_sublex_info.sub_inwhat = op_type;
+    PL_sublex_info.sub_inwhat = (U16)op_type;
     PL_sublex_info.sub_op = PL_lex_op;
     PL_lex_state = LEX_INTERPPUSH;
 
@@ -6185,7 +6185,7 @@ Perl_yylex(pTHX)
        case KEY_our:
        case KEY_my:
        case KEY_state:
-           PL_in_my = tmp;
+           PL_in_my = (U16)tmp;
            s = SKIPSPACE1(s);
            if (isIDFIRST_lazy_if(s,UTF)) {
 #ifdef PERL_MAD
diff --git a/utf8.c b/utf8.c
index 5d381bc..3c80bd2 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -1726,7 +1726,7 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8)
        }
 
        PL_last_swash_hv = hv;
-       PL_last_swash_klen = klen;
+       PL_last_swash_klen = (U8)klen;
        /* FIXME change interpvar.h?  */
        PL_last_swash_tmps = (U8 *) tmps;
        PL_last_swash_slen = slen;