From 045771c05099cf75fea036fdc89308eb3c06549a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 1 Jul 2022 09:48:36 +0300 Subject: Fix most clang-15 -Wunused-but-set-variable Also, refactor trx_i_s_common_fill_table() to remove dead code. Warnings about yynerrs in Bison-generated yyparse() will remain for now. --- scripts/comp_sql.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c index 748b2320f2a..abd59e85bb5 100644 --- a/scripts/comp_sql.c +++ b/scripts/comp_sql.c @@ -1,5 +1,5 @@ /* Copyright (c) 2004, 2010, Oracle and/or its affiliates. - Copyright (c) 2012, 2014, Monty Program Ab + Copyright (c) 2012, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -77,7 +77,6 @@ char *fgets_fn(char *buffer, size_t size, fgets_input_t input, int *error) static void print_query(FILE *out, const char *query) { const char *ptr= query; - int column= 0; fprintf(out, "\""); while (*ptr) @@ -90,21 +89,18 @@ static void print_query(FILE *out, const char *query) and wrap to the next line, tabulated. */ fprintf(out, "\\n\"\n \""); - column= 2; break; case '\r': /* Skipped */ break; case '\"': fprintf(out, "\\\""); - column++; break; case '\\': fprintf(out, "\\\\"); break; default: putc(*ptr, out); - column++; break; } ptr++; -- cgit v1.2.1