diff options
author | Steve Hay <SteveHay@planit.com> | 2005-03-29 15:18:30 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-03-29 15:18:30 +0000 |
commit | fe2774edcceb29d7f31eb2b8407d2ab3df896594 (patch) | |
tree | 5f9e337ef31aaa5474897b7a94d6eefe9c923d79 | |
parent | 1cb0ed9b77e4ba2e0bcbeb9a897574a0fe3f3e52 (diff) | |
download | perl-fe2774edcceb29d7f31eb2b8407d2ab3df896594.tar.gz |
Clean-up some warnings when compiling on Win32 with VC++
p4raw-id: //depot/perl@24096
-rw-r--r-- | hv.c | 2 | ||||
-rw-r--r-- | mg.c | 2 | ||||
-rw-r--r-- | op.c | 10 | ||||
-rw-r--r-- | pp_pack.c | 6 | ||||
-rw-r--r-- | pp_sort.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | utf8.c | 2 | ||||
-rw-r--r-- | util.c | 2 |
8 files changed, 14 insertions, 14 deletions
@@ -1533,7 +1533,7 @@ Perl_hv_clear_placeholders(pTHX_ HV *hv) if (--items == 0) { /* Finished. */ - HvTOTALKEYS(hv) -= HvPLACEHOLDERS(hv); + HvTOTALKEYS(hv) -= (IV)HvPLACEHOLDERS(hv); if (HvKEYS(hv) == 0) HvHASKFLAGS_off(hv); HvPLACEHOLDERS(hv) = 0; @@ -145,7 +145,7 @@ int 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 @@ -2129,7 +2129,7 @@ Perl_convert(pTHX_ I32 type, I32 flags, OP *o) 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); @@ -2146,7 +2146,7 @@ Perl_append_elem(pTHX_ I32 type, OP *first, OP *last) 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); @@ -2171,10 +2171,10 @@ Perl_append_list(pTHX_ I32 type, LISTOP *first, LISTOP *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; @@ -2195,7 +2195,7 @@ Perl_prepend_elem(pTHX_ I32 type, OP *first, OP *last) 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; @@ -585,7 +585,7 @@ uni_to_byte(pTHX_ char **s, const char *end, I32 datumtype) val &= 0xff; } *s += retlen; - return val; + return (U8)val; } #define SHIFT_BYTE(utf8, s, strend, datumtype) ((utf8) ? \ @@ -612,7 +612,7 @@ uni_to_bytes(pTHX_ char **s, char *end, char *buf, int buf_len, I32 datumtype) bad |= 2; val &= 0xff; } - *(U8 *)buf++ = val; + *(U8 *)buf++ = (U8)val; } /* We have enough characters for the buffer. Did we have problems ? */ if (bad) { @@ -2933,7 +2933,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) GROWING(0, cat, start, cur, len+1); end = start+SvLEN(cat)-1; } - *(U8 *) cur++ = auv; + *(U8 *) cur++ = (U8)auv; } } break; @@ -1574,7 +1574,7 @@ PP(pp_sort) 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; } @@ -1699,7 +1699,7 @@ PP(pp_sysread) 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) { @@ -1863,7 +1863,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f } 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': @@ -2816,7 +2816,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char **searc 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]) |