summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-05 18:14:47 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-05 18:14:47 +0000
commit59d6f6a4c05afa7f69dc616d7a7f7446ceb5433a (patch)
tree4fcd0d4434cb6e6f016fd87450f6a2df9a602c3f /embed.fnc
parent816005240f1a3b9989c940e630e829048597537c (diff)
downloadperl-59d6f6a4c05afa7f69dc616d7a7f7446ceb5433a.tar.gz
Avoid miniperl SEGVing when processing -I on the #! line
A side-effect of change 3185893b8dec1062 was to force av in S_incpush() to be NULL, whilst other flag variables were still set as if it were non-NULL, for certain cases, only when compiled with -DPERL_IS_MINIPERL The "obvious" fix is to also set all the flag variables to 0 under -DPERL_IS_MINIPERL, to make everything consistent. However, this confuses (at least) the local version of gcc, which issues warnings about passing a NULL value (av, known always to be NULL) as a not-NULL parameter, despite the fact that all the relevant calls are inside blocks which are actually dead code, due to the if() conditions being const variables set to 0 under -DPERL_IS_MINIPERL. So to avoid future bug reports about compiler warnings, the least worst thing to do seems to be to use #ifndef to use the pre-processor to eliminate the dead code, and related variables.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index 6f4f8fe403..7dcb82e4d3 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1682,7 +1682,9 @@ so |void |validate_suid |NN PerlIO *rsfp
s |void* |parse_body |NULLOK char **env|XSINIT_t xsinit
rs |void |run_body |I32 oldscope
+# ifndef PERL_IS_MINIPERL
s |SV * |incpush_if_exists|NN AV *const av|NN SV *dir|NN SV *const stem
+# endif
#endif
#if defined(PERL_IN_PP_C)