Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af98bb2

Browse files
committed
Move variable declaration to avoid 'unused variable' warning when the
ifdef doesn't trigger. Not worth back-patching. Per buildfarm reports.
1 parent 356eea2 commit af98bb2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/pl/plperl/plperl.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plperl.c - perl as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.148 2009/06/05 20:32:00 adunstan Exp $
4+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.149 2009/06/06 03:45:36 tgl Exp $
55
*
66
**********************************************************************/
77

@@ -398,11 +398,8 @@ plperl_init_interp(void)
398398
static char *embedding[3] = {
399399
"", "-e", PERLBOOT
400400
};
401-
402401
int nargs = 3;
403402

404-
char *dummy_perl_env[1] = { NULL };
405-
406403
#ifdef WIN32
407404

408405
/*
@@ -457,7 +454,11 @@ plperl_init_interp(void)
457454
#if defined(PERL_SYS_INIT3) && !defined(MYMALLOC)
458455
/* only call this the first time through, as per perlembed man page */
459456
if (interp_state == INTERP_NONE)
460-
PERL_SYS_INIT3(&nargs, (char ***) &embedding, (char***)&dummy_perl_env);
457+
{
458+
char *dummy_env[1] = { NULL };
459+
460+
PERL_SYS_INIT3(&nargs, (char ***) &embedding, (char ***) &dummy_env);
461+
}
461462
#endif
462463

463464
plperl_held_interp = perl_alloc();

0 commit comments

Comments
 (0)