[collectd] [PATCH] perl plugin: Fixed an "unused variable" warning.
Sebastian Harl
sh at tokkee.org
Mon Oct 8 16:42:08 CEST 2007
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 at tokkee.org>
---
src/perl.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/perl.c b/src/perl.c
index 01eac9a..8c21e45 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -856,15 +856,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);
--
1.5.3.3.131.g34c6d-dirty
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20071008/d894f03a/attachment.pgp
More information about the collectd
mailing list