From: Sebastian Harl Date: Mon, 8 Oct 2007 14:42:08 +0000 (+0200) Subject: perl plugin: Fixed an "unused variable" warning. X-Git-Tag: collectd-4.2.0~44 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=03f3b203fe0673c17259fb4230f56bf82cb81f6e;p=collectd.git 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 --- 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);