summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--av.c2
-rw-r--r--mg.h2
-rw-r--r--pp_sys.c8
-rw-r--r--scope.c6
-rw-r--r--vms/vms.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/av.c b/av.c
index 29afaff7ee..dffabe48fd 100644
--- a/av.c
+++ b/av.c
@@ -393,7 +393,7 @@ Perl_av_clear(pTHX_ register AV *av)
SV** ary;
#ifdef DEBUGGING
- if (SvREFCNT(av) <= 0 && ckWARN_d(WARN_DEBUGGING)) {
+ if (SvREFCNT(av) == 0 && ckWARN_d(WARN_DEBUGGING)) {
Perl_warner(aTHX_ WARN_DEBUGGING, "Attempt to clear deleted array");
}
#endif
diff --git a/mg.h b/mg.h
index baedde5a6e..ad50f5a0ae 100644
--- a/mg.h
+++ b/mg.h
@@ -40,7 +40,7 @@ struct magic {
#define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR)
#define MgTAINTEDDIR_off(mg) (mg->mg_flags &= ~MGf_TAINTEDDIR)
-#define MgPV(mg,lp) (((lp = (mg)->mg_len) == HEf_SVKEY) ? \
+#define MgPV(mg,lp) ((((int)(lp = (mg)->mg_len)) == HEf_SVKEY) ? \
SvPV((SV*)((mg)->mg_ptr),lp) : \
(mg)->mg_ptr)
diff --git a/pp_sys.c b/pp_sys.c
index a9292a1c83..75206c5be0 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1091,7 +1091,7 @@ PP(pp_getc)
GV *gv;
MAGIC *mg;
- if (MAXARG <= 0)
+ if (MAXARG == 0)
gv = PL_stdingv;
else
gv = (GV*)POPs;
@@ -1701,7 +1701,7 @@ PP(pp_eof)
GV *gv;
MAGIC *mg;
- if (MAXARG <= 0) {
+ if (MAXARG == 0) {
if (PL_op->op_flags & OPf_SPECIAL) { /* eof() */
IO *io;
gv = PL_last_in_gv = PL_argvgv;
@@ -1745,7 +1745,7 @@ PP(pp_tell)
GV *gv;
MAGIC *mg;
- if (MAXARG <= 0)
+ if (MAXARG == 0)
gv = PL_last_in_gv;
else
gv = PL_last_in_gv = (GV*)POPs;
@@ -1980,7 +1980,7 @@ PP(pp_flock)
#ifdef FLOCK
argtype = POPi;
- if (MAXARG <= 0)
+ if (MAXARG == 0)
gv = PL_last_in_gv;
else
gv = (GV*)POPs;
diff --git a/scope.c b/scope.c
index 0f568543ba..4bcc6697fd 100644
--- a/scope.c
+++ b/scope.c
@@ -316,7 +316,7 @@ Perl_save_ary(pTHX_ GV *gv)
av = GvAVn(gv);
if (SvMAGIC(oav)) {
SvMAGIC(av) = SvMAGIC(oav);
- SvFLAGS(av) |= SvMAGICAL(oav);
+ SvFLAGS((SV*)av) |= SvMAGICAL(oav);
SvMAGICAL_off(oav);
SvMAGIC(oav) = 0;
PL_localizing = 1;
@@ -341,7 +341,7 @@ Perl_save_hash(pTHX_ GV *gv)
hv = GvHVn(gv);
if (SvMAGIC(ohv)) {
SvMAGIC(hv) = SvMAGIC(ohv);
- SvFLAGS(hv) |= SvMAGICAL(ohv);
+ SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
SvMAGICAL_off(ohv);
SvMAGIC(ohv) = 0;
PL_localizing = 1;
@@ -715,7 +715,7 @@ Perl_leave_scope(pTHX_ I32 base)
if (GvAV(gv)) {
AV *goner = GvAV(gv);
SvMAGIC(av) = SvMAGIC(goner);
- SvFLAGS(av) |= SvMAGICAL(goner);
+ SvFLAGS((SV*)av) |= SvMAGICAL(goner);
SvMAGICAL_off(goner);
SvMAGIC(goner) = 0;
SvREFCNT_dec(goner);
diff --git a/vms/vms.c b/vms/vms.c
index aee410d18d..a3b030689e 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -3979,7 +3979,7 @@ static time_t toutc_dst(time_t loc) {
if (rsltmp->tm_isdst) loc -= 3600;
return loc;
}
-#define _toutc(secs) ((secs) == -1 ? -1 : \
+#define _toutc(secs) ((secs) == (time_t) -1 ? (time_t) -1 : \
((gmtime_emulation_type || my_time(NULL)), \
(gmtime_emulation_type == 1 ? toutc_dst(secs) : \
((secs) - utc_offset_secs))))
@@ -3992,7 +3992,7 @@ static time_t toloc_dst(time_t utc) {
if (rsltmp->tm_isdst) utc += 3600;
return utc;
}
-#define _toloc(secs) ((secs) == -1 ? -1 : \
+#define _toloc(secs) ((secs) == (time_t) -1 ? (time_t) -1 : \
((gmtime_emulation_type || my_time(NULL)), \
(gmtime_emulation_type == 1 ? toloc_dst(secs) : \
((secs) + utc_offset_secs))))