From 46e87256f3802a18ce825adb0e5f1d5ead748a5c Mon Sep 17 00:00:00 2001 From: Yitzchak Scott-Thoennes Date: Tue, 29 Aug 2000 16:16:14 -0700 Subject: fix misc cast warnings Message-ID: p4raw-id: //depot/perl@6915 --- os2/OS2/ExtAttr/ExtAttr.xs | 10 +++++----- os2/OS2/ExtAttr/typemap | 2 ++ os2/OS2/REXX/REXX.xs | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'os2/OS2') diff --git a/os2/OS2/ExtAttr/ExtAttr.xs b/os2/OS2/ExtAttr/ExtAttr.xs index a69a01c7f3..1f4e203cec 100644 --- a/os2/OS2/ExtAttr/ExtAttr.xs +++ b/os2/OS2/ExtAttr/ExtAttr.xs @@ -15,13 +15,13 @@ my_eadvalue(pTHX_ _ead ead, int index) { SV *sv; int size = _ead_value_size(ead, index); - void *p; + const char *p; if (size == -1) { Perl_die(aTHX_ "Error getting size of EA: %s", strerror(errno)); } p = _ead_get_value(ead, index); - return newSVpv((char*)p, size); + return newSVpv(p, size); } #define my_eadreplace(ead, index, sv, flag) \ @@ -136,7 +136,7 @@ _ead_find(ead, name) _ead ead char * name -void * +const void * _ead_get_fea2list(ead) _ead ead @@ -145,12 +145,12 @@ _ead_get_flags(ead, index) _ead ead int index -char * +const char * _ead_get_name(ead, index) _ead ead int index -void * +const void * _ead_get_value(ead, index) _ead ead int index diff --git a/os2/OS2/ExtAttr/typemap b/os2/OS2/ExtAttr/typemap index a5ff8d63ac..c2f5cda2ed 100644 --- a/os2/OS2/ExtAttr/typemap +++ b/os2/OS2/ExtAttr/typemap @@ -1,2 +1,4 @@ struct _ea * T_PTR _ead T_PTR +const void * T_PTR +const char * T_PV diff --git a/os2/OS2/REXX/REXX.xs b/os2/OS2/REXX/REXX.xs index 8a8e5f2da0..1dc20d3c04 100644 --- a/os2/OS2/REXX/REXX.xs +++ b/os2/OS2/REXX/REXX.xs @@ -29,7 +29,7 @@ static RXSTRING rxcommand = { 9, "RXCOMMAND" }; static RXSTRING rxsubroutine = { 12, "RXSUBROUTINE" }; static RXSTRING rxfunction = { 11, "RXFUNCTION" }; -static ULONG PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret); +static ULONG PERLCALL(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret); #if 1 #define Set RXSHV_SET @@ -109,7 +109,7 @@ exec_in_REXX(pTHX_ char *cmd, char * handlerName, RexxFunctionHandler *handler) static SV* exec_cv; static ULONG -PERLSTART(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) +PERLSTART(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret) { return PERLCALL(NULL, argc, argv, queue, ret); } @@ -122,7 +122,7 @@ PERLSTART(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) #define REXX_eval(cmd) REXX_eval_with(cmd,NULL,NULL) static ULONG -PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) +PERLCALL(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret) { dTHX; EXCEPTIONREGISTRATIONRECORD xreg = { NULL, _emx_exception }; -- cgit v1.2.1