diff options
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -358,6 +358,7 @@ Perl_boot_core_PerlIO(pTHX) void PerlIO_init(pTHX) { + PERL_UNUSED_CONTEXT; /* * Does nothing (yet) except force this file to be included in perl * binary. That allows this file to force inclusion of other functions @@ -395,6 +396,7 @@ PerlIO_tmpfile(void) void PerlIO_init(pTHX) { + PERL_UNUSED_CONTEXT; /* * Force this file to be included in perl binary. Which allows this * file to force inclusion of other functions that may be required by @@ -571,6 +573,7 @@ PerlIO_list_t * PerlIO_list_alloc(pTHX) { PerlIO_list_t *list; + PERL_UNUSED_CONTEXT; Newxz(list, 1, PerlIO_list_t); list->refcnt = 1; return list; @@ -1833,6 +1836,7 @@ Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, int cnt) IV PerlIOUtf8_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab) { + PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(mode); PERL_UNUSED_ARG(arg); if (PerlIOValid(f)) { @@ -2000,6 +2004,7 @@ IV PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab) { PerlIOl * const l = PerlIOBase(f); + PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(arg); l->flags &= ~(PERLIO_F_CANREAD | PERLIO_F_CANWRITE | @@ -2058,6 +2063,7 @@ PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab) IV PerlIOBase_popped(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(f); return 0; } @@ -2114,6 +2120,7 @@ PerlIOBase_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) IV PerlIOBase_noop_ok(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(f); return 0; } @@ -2121,6 +2128,7 @@ PerlIOBase_noop_ok(pTHX_ PerlIO *f) IV PerlIOBase_noop_fail(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; PERL_UNUSED_ARG(f); return -1; } @@ -2157,6 +2165,7 @@ PerlIOBase_close(pTHX_ PerlIO *f) IV PerlIOBase_eof(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; if (PerlIOValid(f)) { return (PerlIOBase(f)->flags & PERLIO_F_EOF) != 0; } @@ -2166,6 +2175,7 @@ PerlIOBase_eof(pTHX_ PerlIO *f) IV PerlIOBase_error(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; if (PerlIOValid(f)) { return (PerlIOBase(f)->flags & PERLIO_F_ERROR) != 0; } @@ -2186,6 +2196,7 @@ PerlIOBase_clearerr(pTHX_ PerlIO *f) void PerlIOBase_setlinebuf(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; if (PerlIOValid(f)) { PerlIOBase(f)->flags |= PERLIO_F_LINEBUF; } @@ -2289,6 +2300,8 @@ PerlIO_init(pTHX) /* Place holder for stdstreams call ??? */ #ifdef USE_THREADS MUTEX_INIT(&PerlIO_mutex); +#else + PERL_UNUSED_CONTEXT; #endif } @@ -2438,6 +2451,7 @@ PerlIOUnix_oflags(const char *mode) IV PerlIOUnix_fileno(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; return PerlIOSelf(f, PerlIOUnix)->fd; } @@ -2460,6 +2474,7 @@ PerlIOUnix_setfd(pTHX_ PerlIO *f, int fd, int imode) s->fd = fd; s->oflags = imode; PerlIOUnix_refcnt_inc(fd); + PERL_UNUSED_CONTEXT; } IV @@ -2487,6 +2502,7 @@ PerlIOUnix_seek(pTHX_ PerlIO *f, Off_t offset, int whence) { const int fd = PerlIOSelf(f, PerlIOUnix)->fd; Off_t new_loc; + PERL_UNUSED_CONTEXT; if (PerlIOBase(f)->flags & PERLIO_F_NOTREG) { #ifdef ESPIPE SETERRNO(ESPIPE, LIB_INVARG); @@ -2630,6 +2646,8 @@ PerlIOUnix_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count) Off_t PerlIOUnix_tell(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + return PerlLIO_lseek(PerlIOSelf(f, PerlIOUnix)->fd, 0, SEEK_CUR); } @@ -2715,6 +2733,8 @@ typedef struct { IV PerlIOStdio_fileno(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + if (PerlIOValid(f)) { FILE * const s = PerlIOSelf(f, PerlIOStdio)->stdio; if (s) @@ -2936,6 +2956,8 @@ PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags) static int PerlIOStdio_invalidate_fileno(pTHX_ FILE *f) { + PERL_UNUSED_CONTEXT; + /* XXX this could use PerlIO_canset_fileno() and * PerlIO_set_fileno() support from Configure */ @@ -3217,6 +3239,8 @@ IV PerlIOStdio_seek(pTHX_ PerlIO *f, Off_t offset, int whence) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; + return PerlSIO_fseek(stdio, offset, whence); } @@ -3224,6 +3248,8 @@ Off_t PerlIOStdio_tell(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; + return PerlSIO_ftell(stdio); } @@ -3231,6 +3257,8 @@ IV PerlIOStdio_flush(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; + PERL_UNUSED_CONTEXT; + if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) { return PerlSIO_fflush(stdio); } @@ -3257,24 +3285,32 @@ PerlIOStdio_flush(pTHX_ PerlIO *f) IV PerlIOStdio_eof(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + return PerlSIO_feof(PerlIOSelf(f, PerlIOStdio)->stdio); } IV PerlIOStdio_error(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + return PerlSIO_ferror(PerlIOSelf(f, PerlIOStdio)->stdio); } void PerlIOStdio_clearerr(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + PerlSIO_clearerr(PerlIOSelf(f, PerlIOStdio)->stdio); } void PerlIOStdio_setlinebuf(pTHX_ PerlIO *f) { + PERL_UNUSED_CONTEXT; + #ifdef HAS_SETLINEBUF PerlSIO_setlinebuf(PerlIOSelf(f, PerlIOStdio)->stdio); #else @@ -3359,6 +3395,8 @@ PerlIOStdio_fill(pTHX_ PerlIO *f) { FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio; int c; + PERL_UNUSED_CONTEXT; + /* * fflush()ing read-only streams can cause trouble on some stdio-s */ @@ -3965,6 +4003,8 @@ STDCHAR * PerlIOBuf_get_base(pTHX_ PerlIO *f) { PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf); + PERL_UNUSED_CONTEXT; + if (!b->buf) { if (!b->bufsiz) b->bufsiz = 4096; |