summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2023-01-10 10:45:03 +1100
committerAndrew Hutchings <andrew@linuxjedi.co.uk>2023-01-10 17:10:43 +0000
commit56948ee54c9d113f07f725ebdc560d1919fc6676 (patch)
treeec9661fb5f822176475aca5590a194615c423f13 /storage/connect
parentd7f447915c96681c85abf00d22de589a5332a6da (diff)
downloadmariadb-git-56948ee54c9d113f07f725ebdc560d1919fc6676.tar.gz
clang15 warnings - unused vars and old prototypes
clang15 finally errors on old prototype definations. Its also a lot fussier about variables that aren't used as is the case a number of time with loop counters that aren't examined. RocksDB was complaining that its get_range function was declared without the array length in ha_rocksdb.h. While a constant is used rather than trying to import the Rdb_key_def::INDEX_NUMBER_SIZE header (was causing a lot of errors on the defination of other orders). If the constant does change can be assured that the same compile warnings will tell us of the error. The ha_rocksdb::index_read_map_impl DBUG_EXECUTE_IF was similar to the existing endless functions used in replication tests. Its rather moot point as the rocksdb.force_shutdown test that uses myrocks_busy_loop_on_row_read is currently disabled.
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/connect.cc6
-rw-r--r--storage/connect/ioapi.c3
-rw-r--r--storage/connect/tabtbl.cpp4
-rw-r--r--storage/connect/zip.c5
4 files changed, 5 insertions, 13 deletions
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc
index 9b9a9d5acb8..73e852bbcba 100644
--- a/storage/connect/connect.cc
+++ b/storage/connect/connect.cc
@@ -237,7 +237,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
bool del, PHC)
{
char *p;
- int i, n;
+ int n;
bool rcop= true;
PCOL colp;
//PCOLUMN cp;
@@ -276,7 +276,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
n = strlen(p) + 1;
} // endfor p
- for (i = 0, colp = tdbp->GetColumns(); colp; i++, colp = colp->GetNext()) {
+ for (colp = tdbp->GetColumns(); colp; colp = colp->GetNext()) {
if (colp->InitValue(g))
throw 2;
@@ -310,7 +310,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
n = strlen(p) + 1;
} // endfor p
- for (i = 0, colp = utp->GetColumns(); colp; i++, colp = colp->GetNext()) {
+ for (colp = utp->GetColumns(); colp; colp = colp->GetNext()) {
if (colp->InitValue(g))
throw 5;
diff --git a/storage/connect/ioapi.c b/storage/connect/ioapi.c
index 1f339982926..b6a0ec318e6 100644
--- a/storage/connect/ioapi.c
+++ b/storage/connect/ioapi.c
@@ -221,8 +221,7 @@ static int ZCALLBACK ferror_file_func (voidpf opaque __attribute__((unused)), vo
return ret;
}
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
+void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
{
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp
index b2240bffa2c..607e7d131f3 100644
--- a/storage/connect/tabtbl.cpp
+++ b/storage/connect/tabtbl.cpp
@@ -230,7 +230,6 @@ PCOL TDBTBL::InsertSpecialColumn(PCOL scp)
/***********************************************************************/
bool TDBTBL::InitTableList(PGLOBAL g)
{
- int n;
uint sln;
const char *scs;
PTABLE tp, tabp;
@@ -243,7 +242,7 @@ bool TDBTBL::InitTableList(PGLOBAL g)
sln = hc->get_table()->s->connect_string.length;
// PlugSetPath(filename, Tdbp->GetFile(g), Tdbp->GetPath());
- for (n = 0, tp = tdp->Tablep; tp; tp = tp->GetNext()) {
+ for (tp = tdp->Tablep; tp; tp = tp->GetNext()) {
if (TestFil(g, To_CondFil, tp)) {
tabp = new(g) XTAB(tp);
@@ -276,7 +275,6 @@ bool TDBTBL::InitTableList(PGLOBAL g)
else
Tablist = tabp;
- n++;
} // endif filp
} // endfor tp
diff --git a/storage/connect/zip.c b/storage/connect/zip.c
index 4bbe31ab7dd..d796fe09b87 100644
--- a/storage/connect/zip.c
+++ b/storage/connect/zip.c
@@ -1471,11 +1471,6 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
{
uLong uTotalOutBefore = zi->ci.stream.total_out;
err=deflate(&zi->ci.stream, Z_NO_FLUSH);
- if(uTotalOutBefore > zi->ci.stream.total_out)
- {
- int bBreak = 0;
- bBreak++;
- }
zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
}