perl plugin: Fixed an "unused variable" warning.
authorSebastian Harl <sh@tokkee.org>
Mon, 8 Oct 2007 14:42:08 +0000 (16:42 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 9 Oct 2007 16:03:43 +0000 (18:03 +0200)
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 <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c

index c85d288..0b78def 100644 (file)
@@ -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);