From 03f3b203fe0673c17259fb4230f56bf82cb81f6e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 8 Oct 2007 16:42:08 +0200 Subject: [PATCH] perl plugin: Fixed an "unused variable" warning. When compiling with debugging disabled, gcc complained about an unused variable in init_pi(). -Werror thus caused the build to fail. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- src/perl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/perl.c b/src/perl.c index c85d2885..0b78defd 100644 --- a/src/perl.c +++ b/src/perl.c @@ -865,15 +865,17 @@ static void xs_init (pTHX) /* Initialize the global Perl interpreter. */ static int init_pi (int argc, char **argv) { - int i = 0; - if (NULL != perl) return 0; log_info ("Initializing Perl interpreter..."); #if COLLECT_DEBUG - for (i = 0; i < argc; ++i) - log_debug ("argv[%i] = \"%s\"", i, argv[i]); + { + int i = 0; + + for (i = 0; i < argc; ++i) + log_debug ("argv[%i] = \"%s\"", i, argv[i]); + } #endif /* COLLECT_DEBUG */ PERL_SYS_INIT3 (&argc, &argv, &environ); -- 2.30.2