From: Jarkko Hietaniemi Date: Fri, 14 Dec 2001 21:26:08 +0000 (+0000) Subject: Silence compiler worries found by Schwern/Digital cc. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc00df79d51119dad89c22fc9ec15f4b44f06876;p=p5sagit%2Fp5-mst-13.2.git Silence compiler worries found by Schwern/Digital cc. p4raw-id: //depot/perl@13691 --- diff --git a/perlio.c b/perlio.c index fa6639e..48d7925 100644 --- a/perlio.c +++ b/perlio.c @@ -2694,7 +2694,7 @@ PerlIOStdio_get_base(PerlIO *f) { dSYS; FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio; - return PerlSIO_get_base(stdio); + return (STDCHAR*)PerlSIO_get_base(stdio); } Size_t @@ -2712,7 +2712,7 @@ PerlIOStdio_get_ptr(PerlIO *f) { dSYS; FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio; - return PerlSIO_get_ptr(stdio); + return (STDCHAR*)PerlSIO_get_ptr(stdio); } SSize_t @@ -2730,7 +2730,7 @@ PerlIOStdio_set_ptrcnt(PerlIO *f, STDCHAR * ptr, SSize_t cnt) dSYS; if (ptr != NULL) { #ifdef STDIO_PTR_LVALUE - PerlSIO_set_ptr(stdio, ptr); + PerlSIO_set_ptr(stdio, (void*)ptr); /* LHS STDCHAR* cast non-portable */ #ifdef STDIO_PTR_LVAL_SETS_CNT if (PerlSIO_get_cnt(stdio) != (cnt)) { dTHX; diff --git a/sv.c b/sv.c index 6a14f60..b80c7e0 100644 --- a/sv.c +++ b/sv.c @@ -5700,7 +5700,7 @@ Perl_sv_gets(pTHX_ register SV *sv, register PerlIO *fp, I32 append) DEBUG_P(PerlIO_printf(Perl_debug_log, "Screamer: going to getc, ptr=%"UVuf", cnt=%ld\n", PTR2UV(ptr),(long)cnt)); - PerlIO_set_ptrcnt(fp, ptr, cnt); /* deregisterize cnt and ptr */ + PerlIO_set_ptrcnt(fp, (STDCHAR*)ptr, cnt); /* deregisterize cnt and ptr */ DEBUG_P(PerlIO_printf(Perl_debug_log, "Screamer: pre: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n", PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp), @@ -5741,7 +5741,7 @@ thats_really_all_folks: cnt += shortbuffered; DEBUG_P(PerlIO_printf(Perl_debug_log, "Screamer: quitting, ptr=%"UVuf", cnt=%ld\n",PTR2UV(ptr),(long)cnt)); - PerlIO_set_ptrcnt(fp, ptr, cnt); /* put these back or we're in trouble */ + PerlIO_set_ptrcnt(fp, (STDCHAR*)ptr, cnt); /* put these back or we're in trouble */ DEBUG_P(PerlIO_printf(Perl_debug_log, "Screamer: end: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n", PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp), diff --git a/x2p/str.c b/x2p/str.c index 47dc9ec..0848989 100644 --- a/x2p/str.c +++ b/x2p/str.c @@ -282,7 +282,7 @@ str_gets(register STR *str, register FILE *fp) if (str->str_len <= cnt) /* make sure we have the room */ GROWSTR(&(str->str_ptr), &(str->str_len), cnt+1); bp = str->str_ptr; /* move these two too to registers */ - ptr = FILE_ptr(fp); + ptr = (STDCHAR*)FILE_ptr(fp); for (;;) { while (--cnt >= 0) { if ((*bp++ = *ptr++) == newline) { @@ -296,7 +296,7 @@ str_gets(register STR *str, register FILE *fp) } FILE_cnt(fp) = cnt; /* deregisterize cnt and ptr */ - FILE_ptr(fp) = ptr; + FILE_ptr(fp) = (void*)ptr; /* LHS STDCHAR* cast non-portable */ i = getc(fp); /* get more characters */ cnt = FILE_cnt(fp); ptr = FILE_ptr(fp); /* reregisterize cnt and ptr */ @@ -316,7 +316,7 @@ str_gets(register STR *str, register FILE *fp) thats_all_folks: FILE_cnt(fp) = cnt; /* put these back or we're in trouble */ - FILE_ptr(fp) = ptr; + FILE_ptr(fp) = (STDCHAR*)ptr; *bp = '\0'; str->str_cur = bp - str->str_ptr; /* set length */