From 94390ba2377c41344328653d5756770409220204 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 7 Oct 2008 09:42:27 +0200 Subject: [PATCH] perl plugin: Fix a compiler warning. With unknown config options the `current_status' variable would have been accessed uninitialized. --- src/perl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/perl.c b/src/perl.c index bb62267e..d3e8c29e 100644 --- a/src/perl.c +++ b/src/perl.c @@ -1806,7 +1806,10 @@ static int perl_config (oconfig_item_t *ci) else if (0 == strcasecmp (c->key, "Plugin")) current_status = perl_config_plugin (aTHX_ c); else + { log_warn ("Ignoring unknown config key \"%s\".", c->key); + current_status = 0; + } /* fatal error - it's up to perl_config_* to clean up */ if (0 > current_status) { -- 2.30.2