summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHallvard B Furuseth <h.b.furuseth@usit.uio.no>1997-04-25 09:45:10 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-27 00:00:00 +1200
commit324aa91a3e6fd44523a86df7c5575563c5adf45c (patch)
tree4ff267f6774abaaf4157a9a978dc8db1b1a294e1
parent8a38ab241313ca4a51b5fc5b36b207cdb71be4db (diff)
downloadperl-324aa91a3e6fd44523a86df7c5575563c5adf45c.tar.gz
Eliminate Alpha warnings
Signed-off-by: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
-rw-r--r--perlsdio.h4
-rw-r--r--pp_sys.c15
2 files changed, 8 insertions, 11 deletions
diff --git a/perlsdio.h b/perlsdio.h
index 8bb50515bd..5a15a719ca 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -106,7 +106,7 @@
#define PerlIO_has_cntptr(f) 0
#define PerlIO_canset_cnt(f) 0
#define PerlIO_get_cnt(f) (abort(),0)
-#define PerlIO_get_ptr(f) (abort(),0)
+#define PerlIO_get_ptr(f) (abort(),(void *)0)
#define PerlIO_set_cnt(f,c) abort()
#define PerlIO_set_ptrcnt(f,p,c) abort()
@@ -123,7 +123,7 @@
#define PerlIO_get_bufsiz(f) FILE_bufsiz(f)
#else
#define PerlIO_has_base(f) 0
-#define PerlIO_get_base(f) (abort(),0)
+#define PerlIO_get_base(f) (abort(),(void *)0)
#define PerlIO_get_bufsiz(f) (abort(),0)
#endif
#else /* PERLIO_IS_STDIO */
diff --git a/pp_sys.c b/pp_sys.c
index 6247f68165..a03d9a4890 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1502,7 +1502,7 @@ PP(pp_ioctl)
unsigned int func = U_I(POPn);
int optype = op->op_type;
char *s;
- int retval;
+ IV retval;
GV *gv = (GV*)POPs;
IO *io = GvIOn(gv);
@@ -1513,22 +1513,19 @@ PP(pp_ioctl)
if (SvPOK(argsv) || !SvNIOK(argsv)) {
STRLEN len;
+ STRLEN need;
s = SvPV_force(argsv, len);
- retval = IOCPARM_LEN(func);
- if (len < retval) {
- s = Sv_Grow(argsv, retval+1);
- SvCUR_set(argsv, retval);
+ need = IOCPARM_LEN(func);
+ if (len < need) {
+ s = Sv_Grow(argsv, need + 1);
+ SvCUR_set(argsv, need);
}
s[SvCUR(argsv)] = 17; /* a little sanity check here */
}
else {
retval = SvIV(argsv);
-#ifdef DOSISH
- s = (char*)(long)retval; /* ouch */
-#else
s = (char*)retval; /* ouch */
-#endif
}
TAINT_PROPER(optype == OP_IOCTL ? "ioctl" : "fcntl");