summaryrefslogtreecommitdiff
path: root/storage/connect/xindex.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-05-10 11:58:23 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2015-05-10 11:58:23 +0200
commit9dee994d992b3930f0d29197aed82771bf910c47 (patch)
tree2c2e6a33feabc7139c26f4353d6bf00feb6268d3 /storage/connect/xindex.cpp
parent1db5b849ab59cb631eb3ab5e1130be08c4fa4a92 (diff)
downloadmariadb-git-9dee994d992b3930f0d29197aed82771bf910c47.tar.gz
Get rid of GCC warnings about unused parameters
modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/catalog.h modified: storage/connect/colblk.cpp modified: storage/connect/colblk.h modified: storage/connect/connect.cc modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamtxt.h modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.h modified: storage/connect/ha_connect.c modified: storage/connect/jsonudf.cpp modified: storage/connect/mycat.h modified: storage/connect/myconn.cpp modified: storage/connect/plgdbutl.cpp modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabcol.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabfmt.h modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/table.cpp modified: storage/connect/tabmul.cpp modified: storage/connect/tabmysql.cpp modified: storage/connect/tabmysql.h modified: storage/connect/taboccur.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabtbl.h modified: storage/connect/tabutil.cpp modified: storage/connect/tabutil.h modified: storage/connect/tabvct.cpp modified: storage/connect/tabvir.cpp modified: storage/connect/tabvir.h modified: storage/connect/tabxcl.cpp modified: storage/connect/tabxcl.h modified: storage/connect/tabxml.cpp modified: storage/connect/tabxml.h modified: storage/connect/valblk.cpp modified: storage/connect/valblk.h modified: storage/connect/value.cpp modified: storage/connect/value.h modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h modified: storage/connect/xobject.h modified: storage/connect/xtable.h
Diffstat (limited to 'storage/connect/xindex.cpp')
-rwxr-xr-xstorage/connect/xindex.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index 024a9c081cd..ee8dc3ac4cb 100755
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -1,7 +1,7 @@
/***************** Xindex C++ Class Xindex Code (.CPP) *****************/
/* Name: XINDEX.CPP Version 2.9 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
+/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
/* */
/* This file contains the class XINDEX implementation code. */
/***********************************************************************/
@@ -179,7 +179,7 @@ XXBASE::XXBASE(PTDBDOS tbxp, bool b) : CSORT(b),
/***********************************************************************/
/* Make file output of XINDEX contents. */
/***********************************************************************/
-void XXBASE::Print(PGLOBAL g, FILE *f, uint n)
+void XXBASE::Print(PGLOBAL, FILE *f, uint n)
{
char m[64];
@@ -191,7 +191,7 @@ void XXBASE::Print(PGLOBAL g, FILE *f, uint n)
/***********************************************************************/
/* Make string output of XINDEX contents. */
/***********************************************************************/
-void XXBASE::Print(PGLOBAL g, char *ps, uint z)
+void XXBASE::Print(PGLOBAL, char *ps, uint z)
{
*ps = '\0';
strncat(ps, "Xindex", z);
@@ -287,7 +287,7 @@ int XINDEX::Qcompare(int *i1, int *i2)
/* Sure enough, it is done while records are read and permit to avoid */
/* reading the table while doing the join (Dynamic index only) */
/***********************************************************************/
-bool XINDEX::AddColumns(PIXDEF xdp)
+bool XINDEX::AddColumns(void)
{
if (!Dynamic)
return false; // Not applying to static index
@@ -377,7 +377,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
To_LastCol = prev;
- if (AddColumns(sxp)) {
+ if (AddColumns()) {
PCOL kolp = To_Cols[0]; // Temporary while imposing Nk = 1
i = 0;
@@ -733,7 +733,7 @@ int XINDEX::ColMaxSame(PXCOL kp)
/* Reorder: use the sort index to reorder the data in storage so */
/* it will be physically sorted and sort index can be removed. */
/***********************************************************************/
-bool XINDEX::Reorder(PGLOBAL g)
+bool XINDEX::Reorder(PGLOBAL g __attribute__((unused)))
{
register int i, j, k, n;
bool sorted = true;
@@ -1585,7 +1585,7 @@ int XINDEX::Range(PGLOBAL g, int limit, bool incl)
if (++i == Nval) break;
} // endfor kp
- if ((k = FastFind(Nval)) < Num_K)
+ if ((k = FastFind()) < Num_K)
n = k;
// if (limit)
// n = (Mul) ? k : kp->Val_K;
@@ -1826,7 +1826,7 @@ int XINDEX::Fetch(PGLOBAL g)
if (trace > 1)
htrc("Fetch: Looking for new value\n");
- Cur_K = FastFind(Nval);
+ Cur_K = FastFind();
if (Cur_K >= Num_K)
/*************************************************************/
@@ -1857,12 +1857,12 @@ int XINDEX::Fetch(PGLOBAL g)
/* FastFind: Returns the index of matching record in a join using an */
/* optimized algorithm based on dichotomie and optimized comparing. */
/***********************************************************************/
-int XINDEX::FastFind(int nv)
+int XINDEX::FastFind(void)
{
register int curk, sup, inf, i= 0, k, n = 2;
register PXCOL kp, kcp;
- assert((int)nv == Nval);
+//assert((int)nv == Nval);
if (Nblk && Op == OP_EQ) {
// Look in block values to find in which block to search
@@ -2018,7 +2018,7 @@ int XINDXS::Range(PGLOBAL g, int limit, bool incl)
/*********************************************************************/
if (xp->GetType() == TYPE_CONST) {
kp->Valp->SetValue_pval(xp->GetValue(), !kp->Prefix);
- k = FastFind(Nval);
+ k = FastFind();
if (k < Num_K || Op != OP_EQ)
if (limit)
@@ -2162,7 +2162,7 @@ int XINDXS::Fetch(PGLOBAL g)
if (trace > 1)
htrc("Fetch: Looking for new value\n");
- Cur_K = FastFind(1);
+ Cur_K = FastFind();
if (Cur_K >= Num_K)
// Rank not whithin index table, signal record not found
@@ -2190,7 +2190,7 @@ int XINDXS::Fetch(PGLOBAL g)
/* FastFind: Returns the index of matching indexed record using an */
/* optimized algorithm based on dichotomie and optimized comparing. */
/***********************************************************************/
-int XINDXS::FastFind(int nk)
+int XINDXS::FastFind(void)
{
register int sup, inf, i= 0, n = 2;
register PXCOL kcp = To_KeyCol;
@@ -2360,7 +2360,8 @@ bool XFILE::Open(PGLOBAL g, char *filename, int id, MODE mode)
/***********************************************************************/
/* Move into an index file. */
/***********************************************************************/
-bool XFILE::Seek(PGLOBAL g, int low, int high, int origin)
+bool XFILE::Seek(PGLOBAL g, int low, int high __attribute__((unused)),
+ int origin)
{
#if defined(_DEBUG)
assert(high == 0);
@@ -2371,7 +2372,6 @@ bool XFILE::Seek(PGLOBAL g, int low, int high, int origin)
return true;
} // endif
-//ftell(Xfile);
return false;
} // end of Seek
@@ -2819,7 +2819,7 @@ void XHUGE::Close(char *fn, int id)
/***********************************************************************/
/* Don't know whether this is possible for huge files. */
/***********************************************************************/
-void *XHUGE::FileView(PGLOBAL g, char *fn)
+void *XHUGE::FileView(PGLOBAL g, char *)
{
strcpy(g->Message, MSG(NO_PART_MAP));
return NULL;
@@ -2879,7 +2879,7 @@ bool XXROW::Init(PGLOBAL g)
/***********************************************************************/
/* RANGE: Tell how many record exist in a given value range. */
/***********************************************************************/
-int XXROW::Range(PGLOBAL g, int limit, bool incl)
+int XXROW::Range(PGLOBAL, int limit, bool incl)
{
int n = Valp->GetIntValue();
@@ -2895,7 +2895,7 @@ int XXROW::Range(PGLOBAL g, int limit, bool incl)
/***********************************************************************/
/* XXROW: Fetch a physical or logical record. */
/***********************************************************************/
-int XXROW::Fetch(PGLOBAL g)
+int XXROW::Fetch(PGLOBAL)
{
if (Num_K == 0)
return -1; // means end of file
@@ -2904,7 +2904,7 @@ int XXROW::Fetch(PGLOBAL g)
/* Look for a key equal to the link column of previous table, */
/* and return its rank whithin the index table. */
/*********************************************************************/
- Cur_K = FastFind(1);
+ Cur_K = FastFind();
if (Cur_K >= Num_K)
/*******************************************************************/
@@ -2926,7 +2926,7 @@ int XXROW::Fetch(PGLOBAL g)
/***********************************************************************/
/* FastFind: Returns the index of matching record in a join. */
/***********************************************************************/
-int XXROW::FastFind(int nk)
+int XXROW::FastFind(void)
{
int n = Valp->GetIntValue();