From ba5ad3fb4b660971fe637069dfe703b7134a6d87 Mon Sep 17 00:00:00 2001 From: Alan Barr Date: Mon, 28 Oct 2019 22:42:47 +0000 Subject: [PATCH] main: Remove dead initialisation in lregex Detected by clang scan-build --- main/lregex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/lregex.c b/main/lregex.c index aed59cf427..28798212be 100644 --- a/main/lregex.c +++ b/main/lregex.c @@ -2631,8 +2631,6 @@ extern void extendRegexTable (struct lregexControlBlock *lcb, const char *src, c extern void printMultitableStatistics (struct lregexControlBlock *lcb) { - struct regexTable *table = ptrArrayItem (lcb->tables, 0); - if (ptrArrayCount(lcb->tables) == 0) return; @@ -2640,7 +2638,7 @@ extern void printMultitableStatistics (struct lregexControlBlock *lcb) fputs("==============================================\n", stderr); for (unsigned int i = 0; i < ptrArrayCount(lcb->tables); i++) { - table = ptrArrayItem (lcb->tables, i); + struct regexTable *table = ptrArrayItem (lcb->tables, i); fprintf(stderr, "%s\n", table->name); fputs("-----------------------\n", stderr); for (unsigned int j = 0; j < ptrArrayCount(table->entries); j++)