From a64ae40f2fd06dfa42c7d97ebb47fc04d4513466 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sat, 15 Jan 2022 20:00:49 +0100 Subject: src: silence compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cache.c:504:22: warning: ‘chain’ may be used uninitialized in this function [-Wmaybe-uninitialized] cache.c:504:22: warning: ‘table’ may be used uninitialized in this function [-Wmaybe-uninitialized] erec.c:128:16: warning: ‘line’ may be used uninitialized in this function [-Wmaybe-uninitialized] optimize.c:524:9: warning: ‘line’ may be used uninitialized in this function [-Wmaybe-uninitialized] Fixes: 8ad4056e9182 ("erec: expose print_location() and line_location()") Fixes: afbd102211dc ("src: do not use the nft_cache_filter object from mnl.c") Fixes: fb298877ece2 ("src: add ruleset optimization infrastructure") Signed-off-by: Florian Westphal --- src/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/optimize.c') diff --git a/src/optimize.c b/src/optimize.c index 76872caa..b5fb2c41 100644 --- a/src/optimize.c +++ b/src/optimize.c @@ -496,7 +496,7 @@ static void rule_optimize_print(struct output_ctx *octx, { const struct location *loc = &rule->location; const struct input_descriptor *indesc = loc->indesc; - const char *line; + const char *line = ""; char buf[1024]; switch (indesc->type) { -- cgit v1.2.3