1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed compiler warnings from gcc 7.4.1

- Fixed possible error in rocksdb/rdb_datadic.cc
This commit is contained in:
Monty
2020-01-29 16:41:04 +02:00
parent cd2c0e013c
commit 4d61f1247a
47 changed files with 282 additions and 197 deletions

View File

@@ -569,8 +569,6 @@ int TDBDOS::ResetTableOpt(PGLOBAL g, bool dop, bool dox)
MaxSize = -1; // Size must be recalculated
Cardinal = -1; // as well as Cardinality
PTXF xp = Txfp;
To_Filter = NULL; // Disable filtering
//To_BlkIdx = NULL; // and index filtering
To_BlkFil = NULL; // and block filtering
@@ -642,7 +640,7 @@ int TDBDOS::MakeBlockValues(PGLOBAL g)
PDOSDEF defp = (PDOSDEF)To_Def;
PDOSCOL colp = NULL;
PDBUSER dup = PlgGetUser(g);
PCATLG cat = defp->GetCat();
PCATLG cat __attribute__((unused))= defp->GetCat();
//void *memp = cat->GetDescp();
if ((nrec = defp->GetElemt()) < 2) {
@@ -1005,14 +1003,14 @@ bool TDBDOS::GetBlockValues(PGLOBAL g)
{
char filename[_MAX_PATH];
int i, lg, n[NZ];
int nrec, block = 0, last = 0, allocblk = 0;
int nrec, block = 0, last = 0;
int len;
bool newblk = false;
size_t ndv, nbm, nbk, blk;
FILE *opfile;
PCOLDEF cdp;
PDOSDEF defp = (PDOSDEF)To_Def;
PCATLG cat = defp->GetCat();
PCATLG cat __attribute__((unused))= defp->GetCat();
PDBUSER dup = PlgGetUser(g);
#if 0
@@ -1294,7 +1292,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif blk
int i, op = filp->GetOpc(), opm = filp->GetOpm(), n = 0;
int i, op = filp->GetOpc(), opm = filp->GetOpm();
bool cnv[2];
PCOL colp;
PXOB arg[2] = {NULL,NULL};
@@ -1337,13 +1335,14 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
bfp = new(g) BLKSPCIN(g, this, op, opm, arg, Txfp->Nrec);
} else if (blk && Txfp->Nrec > 1 && colp->IsClustered())
{
// Clustered column and constant array
if (colp->GetClustered() == 2)
bfp = new(g) BLKFILIN2(g, this, op, opm, arg);
else
bfp = new(g) BLKFILIN(g, this, op, opm, arg);
} // endif this
}
} // endif this
#if 0
} else if (filp->GetArgType(0) == TYPE_SCALF &&
@@ -1419,12 +1418,10 @@ PBF TDBDOS::CheckBlockFilari(PGLOBAL g, PXOB *arg, int op, bool *cnv)
//bool conv = false, xdb2 = false, ok = false, b[2];
//PXOB *xarg1, *xarg2 = NULL, xp[2];
int i, n = 0, type[2] = {0,0};
bool conv = false, xdb2 = false, ok = false;
PXOB *xarg2 = NULL, xp[2];
bool conv = false, xdb2 = false;
PXOB xp[2];
PCOL colp;
//LSTVAL *vlp = NULL;
//SFROW *sfr[2];
PBF *fp = NULL, bfp = NULL;
PBF bfp = NULL;
for (i = 0; i < 2; i++) {
switch (arg[i]->GetType()) {
@@ -1655,7 +1652,7 @@ int TDBDOS::TestBlock(PGLOBAL g)
int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
{
int k, n, rc = RC_OK;
bool fixed, doit, sep, b = (pxdf != NULL);
bool fixed, doit, sep;
PCOL *keycols, colp;
PIXDEF xdp, sxp = NULL;
PKPDEF kdp;
@@ -2831,6 +2828,7 @@ bool DOSCOL::SetBitMap(PGLOBAL g)
bool DOSCOL::CheckSorted(PGLOBAL g)
{
if (Sorted)
{
if (OldVal) {
// Verify whether this column is sorted all right
if (OldVal->CompareValue(Value) > 0) {
@@ -2843,7 +2841,7 @@ bool DOSCOL::CheckSorted(PGLOBAL g)
} else
OldVal = AllocateValue(g, Value);
}
return false;
} // end of CheckSorted