summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/Encode/encengine.c2
-rw-r--r--ext/List/Util/Util.xs6
-rw-r--r--ext/POSIX/POSIX.xs2
-rw-r--r--ext/Storable/Storable.xs4
-rw-r--r--ext/Thread/Thread.xs9
-rwxr-xr-xext/threads/threads.xs1
-rw-r--r--op.c4
-rw-r--r--perl.c2
-rw-r--r--pp.h4
-rw-r--r--sv.c4
10 files changed, 22 insertions, 16 deletions
diff --git a/ext/Encode/encengine.c b/ext/Encode/encengine.c
index 6a08cfd1ab..4ea0667d0b 100644
--- a/ext/Encode/encengine.c
+++ b/ext/Encode/encengine.c
@@ -133,7 +133,7 @@ do_encode(encpage_t * enc, const U8 * src, STRLEN * slen, U8 * dst,
if (approx && (e->slen & 0x80))
code = ENCODE_FALLBACK;
last = s;
- if (term && d-dlast == tlen && memEQ(dlast, term, tlen)) {
+ if (term && (STRLEN)(d-dlast) == tlen && memEQ(dlast, term, tlen)) {
code = ENCODE_FOUND_TERM;
break;
}
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index 412fa3f8c0..de0da94cec 100644
--- a/ext/List/Util/Util.xs
+++ b/ext/List/Util/Util.xs
@@ -215,7 +215,7 @@ CODE:
PERL_CONTEXT *cx;
SV** newsp;
I32 gimme = G_SCALAR;
- I32 hasargs = 0;
+ U8 hasargs = 0;
bool oldcatch = CATCH_GET;
if(items <= 1) {
@@ -270,7 +270,7 @@ CODE:
PERL_CONTEXT *cx;
SV** newsp;
I32 gimme = G_SCALAR;
- I32 hasargs = 0;
+ U8 hasargs = 0;
bool oldcatch = CATCH_GET;
if(items <= 1) {
@@ -481,7 +481,7 @@ CODE:
OUTPUT:
RETVAL
-SV*
+void
set_prototype(subref, proto)
SV *subref
SV *proto
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index d6318aa814..3cf6ab5400 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1386,7 +1386,7 @@ lseek(fd, offset, whence)
OUTPUT:
RETVAL
-SV *
+void
nice(incr)
int incr
PPCODE:
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index a1208dea70..19470cbc49 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -2380,7 +2380,7 @@ static int store_code(stcxt_t *cxt, CV *cv)
#else
dSP;
I32 len;
- int ret, count, reallen;
+ int count, reallen;
SV *text, *bdeparse;
TRACEME(("store_code (0x%"UVxf")", PTR2UV(cv)));
@@ -4961,7 +4961,7 @@ static SV *retrieve_code(stcxt_t *cxt, char *cname)
dSP;
int type, count;
SV *cv;
- SV *sv, *text, *sub, *errsv;
+ SV *sv, *text, *sub;
TRACEME(("retrieve_code (#%d)", cxt->tagnum));
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs
index 14740097f7..97973030c0 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -75,8 +75,11 @@ new(classname, startsv, ...)
void
join(t)
Thread t
- AV * av = NO_INIT
- int i = NO_INIT
+ PREINIT:
+#ifdef USE_5005THREADS
+ AV * av;
+ int i;
+#endif
PPCODE:
void
@@ -105,7 +108,9 @@ void
self(classname)
char * classname
PREINIT:
+#ifdef USE_5005THREADS
SV *sv;
+#endif
PPCODE:
U32
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index c65d3ce9ea..d9d2d27dd3 100755
--- a/ext/threads/threads.xs
+++ b/ext/threads/threads.xs
@@ -519,6 +519,7 @@ Perl_ithread_self (pTHX_ SV *obj, char* Class)
return ithread_to_SV(aTHX_ obj, thread, Class, TRUE);
else
Perl_croak(aTHX_ "panic: cannot find thread data");
+ return NULL; /* silence compiler warning */
}
/*
diff --git a/op.c b/op.c
index a095fb920b..2eadb102fb 100644
--- a/op.c
+++ b/op.c
@@ -194,7 +194,7 @@ Perl_allocmy(pTHX_ char *name)
/* check for duplicate declaration */
pad_check_dup(name,
- PL_in_my == KEY_our,
+ (bool)(PL_in_my == KEY_our),
(PL_curstash ? PL_curstash : PL_defstash)
);
@@ -3744,7 +3744,7 @@ Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *blo
assert(!loop->op_next);
/* for my $x () sets OPpLVAL_INTRO;
* for our $x () sets OPpOUR_INTRO; both only used by Deparse.pm */
- loop->op_private = iterpflags;
+ loop->op_private = (U8)iterpflags;
#ifdef PL_OP_SLAB_ALLOC
{
LOOP *tmp;
diff --git a/perl.c b/perl.c
index 0c6b4d3109..9914935203 100644
--- a/perl.c
+++ b/perl.c
@@ -2189,7 +2189,7 @@ Perl_moreswitches(pTHX_ char *s)
s--;
}
PL_rs = newSVpvn("", 0);
- SvGROW(PL_rs, UNISKIP(rschar) + 1);
+ SvGROW(PL_rs, (STRLEN)(UNISKIP(rschar) + 1));
tmps = (U8*)SvPVX(PL_rs);
uvchr_to_utf8(tmps, rschar);
SvCUR_set(PL_rs, UNISKIP(rschar));
diff --git a/pp.h b/pp.h
index 700d91a0d9..8986db95df 100644
--- a/pp.h
+++ b/pp.h
@@ -205,12 +205,12 @@ See C<PUSHu>.
=cut
*/
-#define EXTEND(p,n) STMT_START { if (PL_stack_max - p < (n)) { \
+#define EXTEND(p,n) STMT_START { if (PL_stack_max - p < (int)(n)) { \
sp = stack_grow(sp,p, (int) (n)); \
} } STMT_END
/* Same thing, but update mark register too. */
-#define MEXTEND(p,n) STMT_START {if (PL_stack_max - p < (n)) { \
+#define MEXTEND(p,n) STMT_START {if (PL_stack_max - p < (int)(n)) { \
int markoff = mark - PL_stack_base; \
sp = stack_grow(sp,p,(int) (n)); \
mark = PL_stack_base + markoff; \
diff --git a/sv.c b/sv.c
index d7487ee4a5..932438b862 100644
--- a/sv.c
+++ b/sv.c
@@ -5918,13 +5918,13 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp)
mg = mg_find(sv, PERL_MAGIC_utf8);
if (mg && mg->mg_ptr) {
cache = (STRLEN *) mg->mg_ptr;
- if (cache[1] == *offsetp) {
+ if (cache[1] == (STRLEN)*offsetp) {
/* An exact match. */
*offsetp = cache[0];
return;
}
- else if (cache[1] < *offsetp) {
+ else if (cache[1] < (STRLEN)*offsetp) {
/* We already know part of the way. */
len = cache[0];
s += cache[1];