summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-06-06 03:45:36 +0000
committerTom Lane2009-06-06 03:45:36 +0000
commit1c4ac5fd81aed94ae9eb3180407aa7c27ac17ac2 (patch)
tree4cc7f6f0f4a0de35b815e6beec3e4e09e4d03bdd
parent7899bf60120776c7ce59d6bfa0e76a0b899c4d4d (diff)
Move variable declaration to avoid 'unused variable' warning when the
ifdef doesn't trigger. Not worth back-patching. Per buildfarm reports.
-rw-r--r--src/pl/plperl/plperl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 339267d619..6ea60a212e 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -398,11 +398,8 @@ plperl_init_interp(void)
static char *embedding[3] = {
"", "-e", PERLBOOT
};
-
int nargs = 3;
- char *dummy_perl_env[1] = { NULL };
-
#ifdef WIN32
/*
@@ -457,7 +454,11 @@ plperl_init_interp(void)
#if defined(PERL_SYS_INIT3) && !defined(MYMALLOC)
/* only call this the first time through, as per perlembed man page */
if (interp_state == INTERP_NONE)
- PERL_SYS_INIT3(&nargs, (char ***) &embedding, (char***)&dummy_perl_env);
+ {
+ char *dummy_env[1] = { NULL };
+
+ PERL_SYS_INIT3(&nargs, (char ***) &embedding, (char ***) &dummy_env);
+ }
#endif
plperl_held_interp = perl_alloc();