diff options
-rw-r--r-- | perlio.c | 6 | ||||
-rw-r--r-- | reentr.c | 2 | ||||
-rw-r--r-- | regen/reentr.pl | 2 | ||||
-rw-r--r-- | time64.c | 2 | ||||
-rw-r--r-- | util.c | 6 | ||||
-rw-r--r-- | win32/perlhost.h | 2 | ||||
-rw-r--r-- | win32/win32.c | 2 |
7 files changed, 12 insertions, 10 deletions
@@ -4847,8 +4847,8 @@ Perl_PerlIO_stderr(pTHX) char * PerlIO_getname(PerlIO *f, char *buf) { - dTHX; #ifdef VMS + dTHX; char *name = NULL; bool exported = FALSE; FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio; @@ -4864,7 +4864,7 @@ PerlIO_getname(PerlIO *f, char *buf) #else PERL_UNUSED_ARG(f); PERL_UNUSED_ARG(buf); - Perl_croak(aTHX_ "Don't know how to get file name"); + Perl_croak_nocontext("Don't know how to get file name"); return NULL; #endif } @@ -5004,7 +5004,9 @@ PerlIO_stdoutf(const char *fmt, ...) PerlIO * PerlIO_tmpfile(void) { +#ifndef WIN32 dTHX; +#endif PerlIO *f = NULL; #ifdef WIN32 const int fd = win32_tmpfd(); @@ -300,10 +300,10 @@ Perl_reentrant_free(pTHX) { void* Perl_reentrant_retry(const char *f, ...) { - dTHX; void *retptr = NULL; va_list ap; #ifdef USE_REENTRANT_API + dTHX; /* Easier to special case this here than in embed.pl. (Look at what it generates for proto.h) */ PERL_ARGS_ASSERT_REENTRANT_RETRY; diff --git a/regen/reentr.pl b/regen/reentr.pl index 49d7efa167..899e83b847 100644 --- a/regen/reentr.pl +++ b/regen/reentr.pl @@ -835,10 +835,10 @@ Perl_reentrant_free(pTHX) { void* Perl_reentrant_retry(const char *f, ...) { - dTHX; void *retptr = NULL; va_list ap; #ifdef USE_REENTRANT_API + dTHX; /* Easier to special case this here than in embed.pl. (Look at what it generates for proto.h) */ PERL_ARGS_ASSERT_REENTRANT_RETRY; @@ -303,7 +303,9 @@ static void S_copy_little_tm_to_big_TM(const struct tm *src, struct TM *dest) { #ifndef HAS_LOCALTIME_R /* Simulate localtime_r() to the best of our ability */ static struct tm * S_localtime_r(const time_t *clock, struct tm *result) { +#ifdef VMS dTHX; /* in case the following is defined as Perl_my_localtime(aTHX_ ...) */ +#endif const struct tm *static_result = localtime(clock); assert(result != NULL); @@ -5989,7 +5989,6 @@ getting C<vsnprintf>. int Perl_my_snprintf(char *buffer, const Size_t len, const char *format, ...) { - dTHX; int retval; va_list ap; PERL_ARGS_ASSERT_MY_SNPRINTF; @@ -6008,7 +6007,7 @@ Perl_my_snprintf(char *buffer, const Size_t len, const char *format, ...) (len > 0 && (Size_t)retval >= len) #endif ) - Perl_croak(aTHX_ "panic: my_snprintf buffer overflow"); + Perl_croak_nocontext("panic: my_snprintf buffer overflow"); return retval; } @@ -6026,7 +6025,6 @@ C<sv_vcatpvf> instead, or getting C<vsnprintf>. int Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap) { - dTHX; int retval; #ifdef NEED_VA_COPY va_list apc; @@ -6054,7 +6052,7 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap (len > 0 && (Size_t)retval >= len) #endif ) - Perl_croak(aTHX_ "panic: my_vsnprintf buffer overflow"); + Perl_croak_nocontext("panic: my_vsnprintf buffer overflow"); return retval; } diff --git a/win32/perlhost.h b/win32/perlhost.h index bd3d1a9fa4..265328b69b 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -1892,6 +1892,8 @@ PerlProcSpawnvp(struct IPerlProc* piPerl, int mode, const char *cmdname, const c int PerlProcLastHost(struct IPerlProc* piPerl) { + /* this dTHX is unused in an optimized build since CPerlHost::num_hosts + is a static */ dTHX; CPerlHost *h = (CPerlHost*)w32_internal_host; return h->LastHost(); diff --git a/win32/win32.c b/win32/win32.c index f0b2ec0f7f..f9e8d97bb9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -384,7 +384,6 @@ get_emd_part(SV **prev_pathp, STRLEN *const len, char *trailing_path, ...) EXTERN_C char * win32_get_privlib(const char *pl, STRLEN *const len) { - dTHX; char *stdlib = "lib"; char buffer[MAX_PATH+1]; SV *sv = NULL; @@ -544,7 +543,6 @@ tokenize(const char *str, char **dest, char ***destv) char **retvstart = 0; int items = -1; if (str) { - dTHX; int slen = strlen(str); char *ret; char **retv; |