summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 09:48:36 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-01 09:48:36 +0300
commit045771c05099cf75fea036fdc89308eb3c06549a (patch)
tree181142185d3a7a612ab0ad238c938ae1e6111131 /scripts
parent6dc1bc3a5822007cdb2d5b79f0a37b4d6b9b65c7 (diff)
downloadmariadb-git-045771c05099cf75fea036fdc89308eb3c06549a.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/comp_sql.c6
1 files changed, 1 insertions, 5 deletions
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++;