summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c2
-rw-r--r--reentr.c6
-rw-r--r--reentr.pl2
-rw-r--r--regcomp.c4
-rw-r--r--regexec.c4
-rw-r--r--sv.c1
-rw-r--r--toke.c4
-rw-r--r--util.c2
8 files changed, 14 insertions, 11 deletions
diff --git a/doio.c b/doio.c
index e6909cb351..ef16b07906 100644
--- a/doio.c
+++ b/doio.c
@@ -1333,6 +1333,8 @@ Perl_my_stat(pTHX)
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
return PL_laststatval;
}
+ /* Should we warn/croak here? Or do something smart/useful? */
+ return (PL_laststatval = -1);
}
diff --git a/reentr.c b/reentr.c
index 9be6f7fc70..bd466525fa 100644
--- a/reentr.c
+++ b/reentr.c
@@ -44,7 +44,7 @@ Perl_reentrant_size(pTHX) {
#ifdef HAS_GETGRNAM_R
# if defined(HAS_SYSCONF) && defined(_SC_GETGR_R_SIZE_MAX) && !defined(__GLIBC__)
PL_reentrant_buffer->_grent_size = sysconf(_SC_GETGR_R_SIZE_MAX);
- if (PL_reentrant_buffer->_grent_size == -1)
+ if ((IV)PL_reentrant_buffer->_grent_size == (IV)-1)
PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE;
# else
# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
@@ -79,7 +79,7 @@ Perl_reentrant_size(pTHX) {
#ifdef HAS_GETPWNAM_R
# if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__)
PL_reentrant_buffer->_pwent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (PL_reentrant_buffer->_pwent_size == -1)
+ if ((IV)PL_reentrant_buffer->_pwent_size == (IV)-1)
PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE;
# else
# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
@@ -101,7 +101,7 @@ Perl_reentrant_size(pTHX) {
#ifdef HAS_GETSPNAM_R
# if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__)
PL_reentrant_buffer->_spent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (PL_reentrant_buffer->_spent_size == -1)
+ if ((IV)PL_reentrant_buffer->_spent_size == (IV)-1)
PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE;
# else
# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
diff --git a/reentr.pl b/reentr.pl
index 13cf4d1087..094a83cbd7 100644
--- a/reentr.pl
+++ b/reentr.pl
@@ -547,7 +547,7 @@ EOF
push @size, <<EOF;
# if defined(HAS_SYSCONF) && defined($sc) && !defined(__GLIBC__)
PL_reentrant_buffer->$sz = sysconf($sc);
- if (PL_reentrant_buffer->$sz == -1)
+ if ((IV)PL_reentrant_buffer->$sz == (IV)-1)
PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE;
# else
# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
diff --git a/regcomp.c b/regcomp.c
index 871043e051..468464696b 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1756,8 +1756,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs
#ifdef DEBUGGING
- U32 mjd_offset;
- U32 mjd_nodelen;
+ U32 mjd_offset = 0;
+ U32 mjd_nodelen = 0;
#endif
/*
This means we convert either the first branch or the first Exact,
diff --git a/regexec.c b/regexec.c
index 679e31fc36..6aa059a097 100644
--- a/regexec.c
+++ b/regexec.c
@@ -474,7 +474,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
#ifdef DEBUGGING /* 7/99: reports of failure (with the older version) */
if (end_shift < 0)
Perl_croak(aTHX_ "panic: end_shift: %"IVdf" pattern:\n%s\n ",
- end_shift,prog->precomp);
+ (IV)end_shift, prog->precomp);
#endif
restart:
@@ -868,7 +868,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
endpos= strend;
DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %d s: %d endpos: %d\n",
- start_shift,check_at-strbeg,s-strbeg,endpos-strbeg));
+ (IV)start_shift, check_at - strbeg, s - strbeg, endpos - strbeg));
t = s;
s = find_byclass(prog, prog->regstclass, s, endpos, NULL);
diff --git a/sv.c b/sv.c
index 6e395efed2..1112f21c62 100644
--- a/sv.c
+++ b/sv.c
@@ -1851,6 +1851,7 @@ STATIC int
S_sv_2iuv_non_preserve(pTHX_ register SV *sv, I32 numtype)
{
dVAR;
+ PERL_UNUSED_ARG(numtype); /* Used only under DEBUGGING? */
DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%"NVgf" inttype=%"UVXf"\n", SvPVX_const(sv), SvIVX(sv), SvNVX(sv), (UV)numtype));
if (SvNVX(sv) < (NV)IV_MIN) {
(void)SvIOKp_on(sv);
diff --git a/toke.c b/toke.c
index f5aa5d1ca4..1cce94790a 100644
--- a/toke.c
+++ b/toke.c
@@ -2193,8 +2193,8 @@ S_scan_const(pTHX_ char *start)
s += 3;
len = e - s;
uv = grok_hex(s, &len, &flags, NULL);
- if ( len != e - s ) {
- uv=0xFFFD;
+ if ( e > s && len != (STRLEN)(e - s) ) {
+ uv = 0xFFFD;
}
s = e + 1;
goto NUM_ESCAPE_INSERT;
diff --git a/util.c b/util.c
index 7e26322d17..d9fde3e5c2 100644
--- a/util.c
+++ b/util.c
@@ -5475,7 +5475,7 @@ Perl_my_clearenv(pTHX)
char *buf = (char*)safesysmalloc(bufsiz);
while (*environ != NULL) {
char *e = strchr(*environ, '=');
- int l = e ? e - *environ : strlen(*environ);
+ int l = e ? e - *environ : (int)strlen(*environ);
if (bsiz < l + 1) {
(void)safesysfree(buf);
bsiz = l + 1; /* + 1 for the \0. */