diff options
56 files changed, 744 insertions, 769 deletions
diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index a2f537436c9..437e9af0bdd 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -1,7 +1,7 @@ /************* Array C++ Functions Source Code File (.CPP) *************/ /* Name: ARRAY.CPP Version 2.3 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* This file contains the XOBJECT derived class ARRAY functions. */ /* ARRAY is used for elaborate type of processing, such as sorting */ @@ -848,7 +848,7 @@ void *ARRAY::GetSortIndex(PGLOBAL g) /* the indication of whether the Find will be always true, always not */ /* true or other. */ /***********************************************************************/ -int ARRAY::BlockTest(PGLOBAL g, int opc, int opm, +int ARRAY::BlockTest(PGLOBAL, int opc, int opm, void *minp, void *maxp, bool s) { bool bin, bax, pin, pax, veq, all = (opm == 2); @@ -1038,7 +1038,7 @@ void ARRAY::Print(PGLOBAL g, FILE *f, uint n) /***********************************************************************/ /* Make string output of ARRAY contents. */ /***********************************************************************/ -void ARRAY::Print(PGLOBAL g, char *ps, uint z) +void ARRAY::Print(PGLOBAL, char *ps, uint z) { if (z < 16) return; diff --git a/storage/connect/blkfil.cpp b/storage/connect/blkfil.cpp index 802231b24ec..c6fb528aa5f 100644 --- a/storage/connect/blkfil.cpp +++ b/storage/connect/blkfil.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -56,7 +56,7 @@ BLOCKFILTER::BLOCKFILTER(PTDBDOS tdbp, int op) /***********************************************************************/ /* Make file output of BLOCKFILTER contents. */ /***********************************************************************/ -void BLOCKFILTER::Print(PGLOBAL g, FILE *f, uint n) +void BLOCKFILTER::Print(PGLOBAL, FILE *f, uint n) { char m[64]; @@ -70,7 +70,7 @@ void BLOCKFILTER::Print(PGLOBAL g, FILE *f, uint n) /***********************************************************************/ /* Make string output of BLOCKFILTER contents. */ /***********************************************************************/ -void BLOCKFILTER::Print(PGLOBAL g, char *ps, uint z) +void BLOCKFILTER::Print(PGLOBAL, char *ps, uint z) { strncat(ps, "BlockFilter(s)", z); } // end of Print @@ -186,7 +186,7 @@ void BLKFILARI::Reset(PGLOBAL g) /***********************************************************************/ /* Evaluate block filter for arithmetic operators. */ /***********************************************************************/ -int BLKFILARI::BlockEval(PGLOBAL g) +int BLKFILARI::BlockEval(PGLOBAL) { int mincmp, maxcmp, n; @@ -306,7 +306,7 @@ void BLKFILAR2::MakeValueBitmap(void) /***********************************************************************/ /* Evaluate XDB2 block filter for arithmetic operators. */ /***********************************************************************/ -int BLKFILAR2::BlockEval(PGLOBAL g) +int BLKFILAR2::BlockEval(PGLOBAL) { #if defined(_DEBUG) assert (Colp->IsClustered()); @@ -428,7 +428,7 @@ void BLKFILMR2::MakeValueBitmap(void) /***********************************************************************/ /* Evaluate XDB2 block filter for arithmetic operators. */ /***********************************************************************/ -int BLKFILMR2::BlockEval(PGLOBAL g) +int BLKFILMR2::BlockEval(PGLOBAL) { #if defined(_DEBUG) assert (Colp->IsClustered()); @@ -514,7 +514,7 @@ void BLKSPCARI::Reset(PGLOBAL g) /***********************************************************************/ /* Evaluate block filter for arithmetic operators (ROWID) */ /***********************************************************************/ -int BLKSPCARI::BlockEval(PGLOBAL g) +int BLKSPCARI::BlockEval(PGLOBAL) { int mincmp, maxcmp, n, m; @@ -605,7 +605,7 @@ BLKFILIN::BLKFILIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm, PXOB *xp) /***********************************************************************/ /* Reset: have the sorted array reset its Bot value to -1 (bottom). */ /***********************************************************************/ -void BLKFILIN::Reset(PGLOBAL g) +void BLKFILIN::Reset(PGLOBAL) { Arap->Reset(); // MakeValueBitmap(); // Does nothing for class BLKFILIN @@ -736,7 +736,7 @@ void BLKFILIN2::MakeValueBitmap(void) /* ended string in case of string argument. This is because the ARRAY */ /* can have a different width than the char column. */ /***********************************************************************/ -int BLKFILIN2::BlockEval(PGLOBAL g) +int BLKFILIN2::BlockEval(PGLOBAL) { if (N < 0) return Result; // Was set in MakeValueBitmap @@ -909,7 +909,7 @@ int BLKFILIN2::BlockEval(PGLOBAL g) /***********************************************************************/ /* BLKSPCIN constructor. */ /***********************************************************************/ -BLKSPCIN::BLKSPCIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm, +BLKSPCIN::BLKSPCIN(PGLOBAL, PTDBDOS tdbp, int op, int opm, PXOB *xp, int bsize) : BLOCKFILTER(tdbp, op) { @@ -930,7 +930,7 @@ BLKSPCIN::BLKSPCIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm, /***********************************************************************/ /* Reset: have the sorted array reset its Bot value to -1 (bottom). */ /***********************************************************************/ -void BLKSPCIN::Reset(PGLOBAL g) +void BLKSPCIN::Reset(PGLOBAL) { Arap->Reset(); } // end of Reset diff --git a/storage/connect/block.h b/storage/connect/block.h index d63a899d1f5..40529ffc81f 100644 --- a/storage/connect/block.h +++ b/storage/connect/block.h @@ -50,7 +50,7 @@ class DllExport BLOCK { #if !defined(__BORLANDC__) // Avoid warning C4291 by defining a matching dummy delete operator void operator delete(void *, PGLOBAL, void *) {} - void operator delete(void *ptr,size_t size) {} + void operator delete(void *, size_t) {} #endif virtual ~BLOCK() {} diff --git a/storage/connect/catalog.h b/storage/connect/catalog.h index 5baab294737..6488b513ba9 100644 --- a/storage/connect/catalog.h +++ b/storage/connect/catalog.h @@ -1,7 +1,7 @@ /*************** Catalog H Declares Source Code File (.H) **************/ /* Name: CATALOG.H Version 3.3 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2000-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2000-2015 */ /* */ /* This file contains the CATALOG PlugDB classes definitions. */ /***********************************************************************/ @@ -73,33 +73,29 @@ class DllExport CATALOG { // Methods virtual void Reset(void) {} //virtual void SetDataPath(PGLOBAL g, const char *path) {} - virtual bool CheckName(PGLOBAL g, char *name) {return true;} - virtual bool ClearName(PGLOBAL g, PSZ name) {return true;} - virtual PRELDEF MakeOneTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;} - virtual PRELDEF GetTableDescEx(PGLOBAL g, PTABLE tablep) {return NULL;} - virtual PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name, LPCSTR type, - PRELDEF *prp = NULL) {return NULL;} - virtual PRELDEF GetFirstTable(PGLOBAL g) {return NULL;} - virtual PRELDEF GetNextTable(PGLOBAL g) {return NULL;} - virtual bool TestCond(PGLOBAL g, const char *name, const char *type) - {return true;} - virtual bool DropTable(PGLOBAL g, PSZ name, bool erase) {return true;} - virtual PTDB GetTable(PGLOBAL g, PTABLE tablep, - MODE mode = MODE_READ, LPCSTR type = NULL) - {return NULL;} - virtual void TableNames(PGLOBAL g, char *buffer, int maxbuf, int info[]) {} - virtual void ColumnNames(PGLOBAL g, char *tabname, char *buffer, - int maxbuf, int info[]) {} - virtual void ColumnDefs(PGLOBAL g, char *tabname, char *buffer, - int maxbuf, int info[]) {} - virtual void *DecodeValues(PGLOBAL g, char *tabname, char *colname, - char *buffer, int maxbuf, int info[]) {return NULL;} - virtual int ColumnType(PGLOBAL g, char *tabname, char *colname) {return 0;} - virtual void ClearDB(PGLOBAL g) {} + virtual bool CheckName(PGLOBAL, char*) {return true;} + virtual bool ClearName(PGLOBAL, PSZ) {return true;} + virtual PRELDEF MakeOneTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;} + virtual PRELDEF GetTableDescEx(PGLOBAL, PTABLE) {return NULL;} + virtual PRELDEF GetTableDesc(PGLOBAL, LPCSTR, LPCSTR, + PRELDEF* = NULL) {return NULL;} + virtual PRELDEF GetFirstTable(PGLOBAL) {return NULL;} + virtual PRELDEF GetNextTable(PGLOBAL) {return NULL;} + virtual bool TestCond(PGLOBAL, const char*, const char*) {return true;} + virtual bool DropTable(PGLOBAL, PSZ, bool) {return true;} + virtual PTDB GetTable(PGLOBAL, PTABLE, + MODE = MODE_READ, LPCSTR = NULL) {return NULL;} + virtual void TableNames(PGLOBAL, char*, int, int[]) {} + virtual void ColumnNames(PGLOBAL, char*, char*, int, int[]) {} + virtual void ColumnDefs(PGLOBAL, char*, char*, int, int[]) {} + virtual void *DecodeValues(PGLOBAL, char*, char*, char*, + int, int[]) {return NULL;} + virtual int ColumnType(PGLOBAL, char*, char*) {return 0;} + virtual void ClearDB(PGLOBAL) {} protected: - virtual bool ClearSection(PGLOBAL g, const char *key, const char *section) {return true;} - virtual PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;} + virtual bool ClearSection(PGLOBAL, const char*, const char*) {return true;} + virtual PRELDEF MakeTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;} // Members char *Cbuf; /* Buffer used for col section */ diff --git a/storage/connect/colblk.cpp b/storage/connect/colblk.cpp index 78aba7bc494..7166af8027b 100644 --- a/storage/connect/colblk.cpp +++ b/storage/connect/colblk.cpp @@ -1,417 +1,417 @@ -/************* Colblk C++ Functions Source Code File (.CPP) ************/
-/* Name: COLBLK.CPP Version 2.1 */
-/* */
-/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
-/* */
-/* This file contains the COLBLK class functions. */
-/***********************************************************************/
-
-/***********************************************************************/
-/* Include relevant MariaDB header file. */
-/***********************************************************************/
-#include "my_global.h"
-
-/***********************************************************************/
-/* Include required application header files */
-/* global.h is header containing all global Plug declarations. */
-/* plgdbsem.h is header containing the DB applic. declarations. */
-/***********************************************************************/
-#include "global.h"
-#include "plgdbsem.h"
-#include "tabcol.h"
-#include "colblk.h"
-#include "xindex.h"
-#include "xtable.h"
-
-/***********************************************************************/
-/* COLBLK protected constructor. */
-/***********************************************************************/
-COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i)
- {
- Next = NULL;
- Index = i;
-//Number = 0;
- ColUse = 0;
-
- if ((Cdp = cdp)) {
- Name = cdp->Name;
- Format = cdp->F;
- Opt = cdp->Opt;
- Long = cdp->Long;
- Precision = cdp->Precision;
- Freq = cdp->Freq;
- Buf_Type = cdp->Buf_Type;
- ColUse |= cdp->Flags; // Used by CONNECT
- Nullable = !!(cdp->Flags & U_NULLS);
- Unsigned = !!(cdp->Flags & U_UNSIGNED);
- } else {
- Name = NULL;
- memset(&Format, 0, sizeof(FORMAT));
- Opt = 0;
- Long = 0;
- Precision = 0;
- Freq = 0;
- Buf_Type = TYPE_ERROR;
- Nullable = false;
- Unsigned = false;
- } // endif cdp
-
- To_Tdb = tdbp;
- Status = BUF_NO;
-//Value = NULL; done in XOBJECT constructor
- To_Kcol = NULL;
- } // end of COLBLK constructor
-
-/***********************************************************************/
-/* COLBLK constructor used for copying columns. */
-/* tdbp is the pointer to the new table descriptor. */
-/***********************************************************************/
-COLBLK::COLBLK(PCOL col1, PTDB tdbp)
- {
- PCOL colp;
-
- // Copy the old column block to the new one
- *this = *col1;
- Next = NULL;
-//To_Orig = col1;
- To_Tdb = tdbp;
-
- if (trace > 1)
- htrc(" copying COLBLK %s from %p to %p\n", Name, col1, this);
-
- if (tdbp)
- // Attach the new column to the table block
- if (!tdbp->GetColumns())
- tdbp->SetColumns(this);
- else {
- for (colp = tdbp->GetColumns(); colp->Next; colp = colp->Next) ;
-
- colp->Next = this;
- } // endelse
-
- } // end of COLBLK copy constructor
-
-/***********************************************************************/
-/* Reset the column descriptor to non evaluated yet. */
-/***********************************************************************/
-void COLBLK::Reset(void)
- {
- Status &= ~BUF_READ;
- } // end of Reset
-
-/***********************************************************************/
-/* Compare: compares itself to an (expression) object and returns */
-/* true if it is equivalent. */
-/***********************************************************************/
-bool COLBLK::Compare(PXOB xp)
- {
- return (this == xp);
- } // end of Compare
-
-/***********************************************************************/
-/* SetFormat: function used to set SELECT output format. */
-/***********************************************************************/
-bool COLBLK::SetFormat(PGLOBAL g, FORMAT& fmt)
- {
- fmt = Format;
-
- if (trace > 1)
- htrc("COLBLK: %p format=%c(%d,%d)\n",
- this, *fmt.Type, fmt.Length, fmt.Prec);
-
- return false;
- } // end of SetFormat
-
-/***********************************************************************/
-/* Eval: get the column value from the last read record or from a */
-/* matching Index column if there is one. */
-/***********************************************************************/
-bool COLBLK::Eval(PGLOBAL g)
- {
- if (trace > 1)
- htrc("Col Eval: %s status=%.4X\n", Name, Status);
-
- if (!GetStatus(BUF_READ)) {
-// if (To_Tdb->IsNull())
-// Value->Reset();
- if (To_Kcol)
- To_Kcol->FillValue(Value);
- else
- ReadColumn(g);
-
- AddStatus(BUF_READ);
- } // endif
-
- return false;
- } // end of Eval
-
-/***********************************************************************/
-/* InitValue: prepare a column block for read operation. */
-/* Now we use Format.Length for the len parameter to avoid strings */
-/* to be truncated when converting from string to coded string. */
-/* Added in version 1.5 is the arguments GetScale() and Domain */
-/* in calling AllocateValue. Domain is used for TYPE_DATE only. */
-/***********************************************************************/
-bool COLBLK::InitValue(PGLOBAL g)
- {
- if (Value)
- return false; // Already done
-
- // Allocate a Value object
- if (!(Value = AllocateValue(g, Buf_Type, Precision,
- GetScale(), Unsigned, GetDomain())))
- return true;
-
- AddStatus(BUF_READY);
- Value->SetNullable(Nullable);
-
- if (trace > 1)
- htrc(" colp=%p type=%d value=%p coluse=%.4X status=%.4X\n",
- this, Buf_Type, Value, ColUse, Status);
-
- return false;
- } // end of InitValue
-
-/***********************************************************************/
-/* SetBuffer: prepare a column block for write operation. */
-/***********************************************************************/
-bool COLBLK::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
- {
- sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer");
- return true;
- } // end of SetBuffer
-
-/***********************************************************************/
-/* GetLength: returns an evaluation of the column string length. */
-/***********************************************************************/
-int COLBLK::GetLengthEx(void)
- {
- return Long;
- } // end of GetLengthEx
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to access the last line */
-/* read from the corresponding table, extract from it the field */
-/* corresponding to this column and convert it to buffer type. */
-/***********************************************************************/
-void COLBLK::ReadColumn(PGLOBAL g)
- {
- sprintf(g->Message, MSG(UNDEFINED_AM), "ReadColumn");
- longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
- } // end of ReadColumn
-
-/***********************************************************************/
-/* WriteColumn: what this routine does is to access the last line */
-/* read from the corresponding table, and rewrite the field */
-/* corresponding to this column from the column buffer and type. */
-/***********************************************************************/
-void COLBLK::WriteColumn(PGLOBAL g)
- {
- sprintf(g->Message, MSG(UNDEFINED_AM), "WriteColumn");
- longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
- } // end of WriteColumn
-
-/***********************************************************************/
-/* Make file output of a column descriptor block. */
-/***********************************************************************/
-void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
- {
- char m[64];
- int i;
- PCOL colp;
-
- memset(m, ' ', n); // Make margin string
- m[n] = '\0';
-
- for (colp = To_Tdb->GetColumns(), i = 1; colp; colp = colp->Next, i++)
- if (colp == this)
- break;
-
- fprintf(f, "%sR%dC%d type=%d F=%.2s(%d,%d)", m, To_Tdb->GetTdb_No(),
- i, GetAmType(), Format.Type, Format.Length, Format.Prec);
- fprintf(f,
- " coluse=%04X status=%04X buftyp=%d value=%p name=%s\n",
- ColUse, Status, Buf_Type, Value, Name);
- } // end of Print
-
-/***********************************************************************/
-/* Make string output of a column descriptor block. */
-/***********************************************************************/
-void COLBLK::Print(PGLOBAL g, char *ps, uint z)
- {
- sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name);
- } // end of Print
-
-
-/***********************************************************************/
-/* SPCBLK constructor. */
-/***********************************************************************/
-SPCBLK::SPCBLK(PCOLUMN cp)
- : COLBLK((PCOLDEF)NULL, cp->GetTo_Table()->GetTo_Tdb(), 0)
- {
- Name = (char*)cp->GetName();
- Precision = Long = 0;
- Buf_Type = TYPE_ERROR;
- } // end of SPCBLK constructor
-
-/***********************************************************************/
-/* WriteColumn: what this routine does is to access the last line */
-/* read from the corresponding table, and rewrite the field */
-/* corresponding to this column from the column buffer and type. */
-/***********************************************************************/
-void SPCBLK::WriteColumn(PGLOBAL g)
- {
- sprintf(g->Message, MSG(SPCOL_READONLY), Name);
- longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
- } // end of WriteColumn
-
-/***********************************************************************/
-/* RIDBLK constructor for the ROWID special column. */
-/***********************************************************************/
-RIDBLK::RIDBLK(PCOLUMN cp, bool rnm) : SPCBLK(cp)
- {
- Precision = Long = 10;
- Buf_Type = TYPE_INT;
- Rnm = rnm;
- *Format.Type = 'N';
- Format.Length = 10;
- } // end of RIDBLK constructor
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to return the ordinal */
-/* number of the current row in the table (if Rnm is true) or in the */
-/* current file (if Rnm is false) the same except for multiple tables.*/
-/***********************************************************************/
-void RIDBLK::ReadColumn(PGLOBAL g)
- {
- Value->SetValue(To_Tdb->RowNumber(g, Rnm));
- } // end of ReadColumn
-
-/***********************************************************************/
-/* FIDBLK constructor for the FILEID special column. */
-/***********************************************************************/
-FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op)
- {
-//Is_Key = 2; for when the MUL table indexed reading will be implemented.
- Precision = Long = _MAX_PATH;
- Buf_Type = TYPE_STRING;
- *Format.Type = 'C';
- Format.Length = Long;
-#if defined(WIN32)
- Format.Prec = 1; // Case insensitive
-#endif // WIN32
- Constant = (!((PTDBASE)To_Tdb)->GetDef()->GetMultiple() &&
- To_Tdb->GetAmType() != TYPE_AM_PLG &&
- To_Tdb->GetAmType() != TYPE_AM_PLM);
- Fn = NULL;
- } // end of FIDBLK constructor
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to return the current */
-/* file ID of the table (can change for Multiple tables). */
-/***********************************************************************/
-void FIDBLK::ReadColumn(PGLOBAL g)
- {
- if (Fn != ((PTDBASE)To_Tdb)->GetFile(g)) {
- char filename[_MAX_PATH];
-
- Fn = ((PTDBASE)To_Tdb)->GetFile(g);
- PlugSetPath(filename, Fn, ((PTDBASE)To_Tdb)->GetPath());
-
- if (Op != OP_XX) {
- char buff[_MAX_PATH];
-
- Value->SetValue_psz(ExtractFromPath(g, buff, filename, Op));
- } else
- Value->SetValue_psz(filename);
-
- } // endif Fn
-
- } // end of ReadColumn
-
-/***********************************************************************/
-/* TIDBLK constructor for the TABID special column. */
-/***********************************************************************/
-TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp)
- {
-//Is_Key = 2; for when the MUL table indexed reading will be implemented.
- Precision = Long = 64;
- Buf_Type = TYPE_STRING;
- *Format.Type = 'C';
- Format.Length = Long;
- Format.Prec = 1; // Case insensitive
- Constant = (To_Tdb->GetAmType() != TYPE_AM_TBL);
- Tname = NULL;
- } // end of TIDBLK constructor
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to return the table ID. */
-/***********************************************************************/
-void TIDBLK::ReadColumn(PGLOBAL g)
- {
- if (Tname == NULL) {
- Tname = (char*)To_Tdb->GetName();
- Value->SetValue_psz(Tname);
- } // endif Tname
-
- } // end of ReadColumn
-
-/***********************************************************************/
-/* PRTBLK constructor for the PARTID special column. */
-/***********************************************************************/
-PRTBLK::PRTBLK(PCOLUMN cp) : SPCBLK(cp)
- {
-//Is_Key = 2; for when the MUL table indexed reading will be implemented.
- Precision = Long = 64;
- Buf_Type = TYPE_STRING;
- *Format.Type = 'C';
- Format.Length = Long;
- Format.Prec = 1; // Case insensitive
- Constant = true; // TODO: check whether this is true indeed
- Pname = NULL;
- } // end of PRTBLK constructor
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to return the partition ID. */
-/***********************************************************************/
-void PRTBLK::ReadColumn(PGLOBAL g)
- {
- if (Pname == NULL) {
- char *p;
- PTDBASE tdbp = (PTDBASE)To_Tdb;
-
- Pname = tdbp->GetDef()->GetStringCatInfo(g, "partname", "?");
-
- p = strrchr(Pname, '#');
- Value->SetValue_psz((p) ? p + 1 : Pname);
- } // endif Pname
-
- } // end of ReadColumn
-
-/***********************************************************************/
-/* SIDBLK constructor for the SERVID special column. */
-/***********************************************************************/
-SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp)
- {
-//Is_Key = 2; for when the MUL table indexed reading will be implemented.
- Precision = Long = 64;
- Buf_Type = TYPE_STRING;
- *Format.Type = 'C';
- Format.Length = Long;
- Format.Prec = 1; // Case insensitive
- Constant = (To_Tdb->GetAmType() != TYPE_AM_TBL);
- Sname = NULL;
- } // end of TIDBLK constructor
-
-/***********************************************************************/
-/* ReadColumn: what this routine does is to return the server ID. */
-/***********************************************************************/
-void SIDBLK::ReadColumn(PGLOBAL g)
- {
-//if (Sname == NULL) {
- Sname = (char*)To_Tdb->GetServer();
- Value->SetValue_psz(Sname);
-// } // endif Sname
-
- } // end of ReadColumn
-
+/************* Colblk C++ Functions Source Code File (.CPP) ************/ +/* Name: COLBLK.CPP Version 2.1 */ +/* */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ +/* */ +/* This file contains the COLBLK class functions. */ +/***********************************************************************/ + +/***********************************************************************/ +/* Include relevant MariaDB header file. */ +/***********************************************************************/ +#include "my_global.h" + +/***********************************************************************/ +/* Include required application header files */ +/* global.h is header containing all global Plug declarations. */ +/* plgdbsem.h is header containing the DB applic. declarations. */ +/***********************************************************************/ +#include "global.h" +#include "plgdbsem.h" +#include "tabcol.h" +#include "colblk.h" +#include "xindex.h" +#include "xtable.h" + +/***********************************************************************/ +/* COLBLK protected constructor. */ +/***********************************************************************/ +COLBLK::COLBLK(PCOLDEF cdp, PTDB tdbp, int i) + { + Next = NULL; + Index = i; +//Number = 0; + ColUse = 0; + + if ((Cdp = cdp)) { + Name = cdp->Name; + Format = cdp->F; + Opt = cdp->Opt; + Long = cdp->Long; + Precision = cdp->Precision; + Freq = cdp->Freq; + Buf_Type = cdp->Buf_Type; + ColUse |= cdp->Flags; // Used by CONNECT + Nullable = !!(cdp->Flags & U_NULLS); + Unsigned = !!(cdp->Flags & U_UNSIGNED); + } else { + Name = NULL; + memset(&Format, 0, sizeof(FORMAT)); + Opt = 0; + Long = 0; + Precision = 0; + Freq = 0; + Buf_Type = TYPE_ERROR; + Nullable = false; + Unsigned = false; + } // endif cdp + + To_Tdb = tdbp; + Status = BUF_NO; +//Value = NULL; done in XOBJECT constructor + To_Kcol = NULL; + } // end of COLBLK constructor + +/***********************************************************************/ +/* COLBLK constructor used for copying columns. */ +/* tdbp is the pointer to the new table descriptor. */ +/***********************************************************************/ +COLBLK::COLBLK(PCOL col1, PTDB tdbp) + { + PCOL colp; + + // Copy the old column block to the new one + *this = *col1; + Next = NULL; +//To_Orig = col1; + To_Tdb = tdbp; + + if (trace > 1) + htrc(" copying COLBLK %s from %p to %p\n", Name, col1, this); + + if (tdbp) + // Attach the new column to the table block + if (!tdbp->GetColumns()) + tdbp->SetColumns(this); + else { + for (colp = tdbp->GetColumns(); colp->Next; colp = colp->Next) ; + + colp->Next = this; + } // endelse + + } // end of COLBLK copy constructor + +/***********************************************************************/ +/* Reset the column descriptor to non evaluated yet. */ +/***********************************************************************/ +void COLBLK::Reset(void) + { + Status &= ~BUF_READ; + } // end of Reset + +/***********************************************************************/ +/* Compare: compares itself to an (expression) object and returns */ +/* true if it is equivalent. */ +/***********************************************************************/ +bool COLBLK::Compare(PXOB xp) + { + return (this == xp); + } // end of Compare + +/***********************************************************************/ +/* SetFormat: function used to set SELECT output format. */ +/***********************************************************************/ +bool COLBLK::SetFormat(PGLOBAL, FORMAT& fmt) + { + fmt = Format; + + if (trace > 1) + htrc("COLBLK: %p format=%c(%d,%d)\n", + this, *fmt.Type, fmt.Length, fmt.Prec); + + return false; + } // end of SetFormat + +/***********************************************************************/ +/* Eval: get the column value from the last read record or from a */ +/* matching Index column if there is one. */ +/***********************************************************************/ +bool COLBLK::Eval(PGLOBAL g) + { + if (trace > 1) + htrc("Col Eval: %s status=%.4X\n", Name, Status); + + if (!GetStatus(BUF_READ)) { +// if (To_Tdb->IsNull()) +// Value->Reset(); + if (To_Kcol) + To_Kcol->FillValue(Value); + else + ReadColumn(g); + + AddStatus(BUF_READ); + } // endif + + return false; + } // end of Eval + +/***********************************************************************/ +/* InitValue: prepare a column block for read operation. */ +/* Now we use Format.Length for the len parameter to avoid strings */ +/* to be truncated when converting from string to coded string. */ +/* Added in version 1.5 is the arguments GetScale() and Domain */ +/* in calling AllocateValue. Domain is used for TYPE_DATE only. */ +/***********************************************************************/ +bool COLBLK::InitValue(PGLOBAL g) + { + if (Value) + return false; // Already done + + // Allocate a Value object + if (!(Value = AllocateValue(g, Buf_Type, Precision, + GetScale(), Unsigned, GetDomain()))) + return true; + + AddStatus(BUF_READY); + Value->SetNullable(Nullable); + + if (trace > 1) + htrc(" colp=%p type=%d value=%p coluse=%.4X status=%.4X\n", + this, Buf_Type, Value, ColUse, Status); + + return false; + } // end of InitValue + +/***********************************************************************/ +/* SetBuffer: prepare a column block for write operation. */ +/***********************************************************************/ +bool COLBLK::SetBuffer(PGLOBAL g, PVAL, bool, bool) + { + sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer"); + return true; + } // end of SetBuffer + +/***********************************************************************/ +/* GetLength: returns an evaluation of the column string length. */ +/***********************************************************************/ +int COLBLK::GetLengthEx(void) + { + return Long; + } // end of GetLengthEx + +/***********************************************************************/ +/* ReadColumn: what this routine does is to access the last line */ +/* read from the corresponding table, extract from it the field */ +/* corresponding to this column and convert it to buffer type. */ +/***********************************************************************/ +void COLBLK::ReadColumn(PGLOBAL g) + { + sprintf(g->Message, MSG(UNDEFINED_AM), "ReadColumn"); + longjmp(g->jumper[g->jump_level], TYPE_COLBLK); + } // end of ReadColumn + +/***********************************************************************/ +/* WriteColumn: what this routine does is to access the last line */ +/* read from the corresponding table, and rewrite the field */ +/* corresponding to this column from the column buffer and type. */ +/***********************************************************************/ +void COLBLK::WriteColumn(PGLOBAL g) + { + sprintf(g->Message, MSG(UNDEFINED_AM), "WriteColumn"); + longjmp(g->jumper[g->jump_level], TYPE_COLBLK); + } // end of WriteColumn + +/***********************************************************************/ +/* Make file output of a column descriptor block. */ +/***********************************************************************/ +void COLBLK::Print(PGLOBAL, FILE *f, uint n) + { + char m[64]; + int i; + PCOL colp; + + memset(m, ' ', n); // Make margin string + m[n] = '\0'; + + for (colp = To_Tdb->GetColumns(), i = 1; colp; colp = colp->Next, i++) + if (colp == this) + break; + + fprintf(f, "%sR%dC%d type=%d F=%.2s(%d,%d)", m, To_Tdb->GetTdb_No(), + i, GetAmType(), Format.Type, Format.Length, Format.Prec); + fprintf(f, + " coluse=%04X status=%04X buftyp=%d value=%p name=%s\n", + ColUse, Status, Buf_Type, Value, Name); + } // end of Print + +/***********************************************************************/ +/* Make string output of a column descriptor block. */ +/***********************************************************************/ +void COLBLK::Print(PGLOBAL, char *ps, uint) + { + sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name); + } // end of Print + + +/***********************************************************************/ +/* SPCBLK constructor. */ +/***********************************************************************/ +SPCBLK::SPCBLK(PCOLUMN cp) + : COLBLK((PCOLDEF)NULL, cp->GetTo_Table()->GetTo_Tdb(), 0) + { + Name = (char*)cp->GetName(); + Precision = Long = 0; + Buf_Type = TYPE_ERROR; + } // end of SPCBLK constructor + +/***********************************************************************/ +/* WriteColumn: what this routine does is to access the last line */ +/* read from the corresponding table, and rewrite the field */ +/* corresponding to this column from the column buffer and type. */ +/***********************************************************************/ +void SPCBLK::WriteColumn(PGLOBAL g) + { + sprintf(g->Message, MSG(SPCOL_READONLY), Name); + longjmp(g->jumper[g->jump_level], TYPE_COLBLK); + } // end of WriteColumn + +/***********************************************************************/ +/* RIDBLK constructor for the ROWID special column. */ +/***********************************************************************/ +RIDBLK::RIDBLK(PCOLUMN cp, bool rnm) : SPCBLK(cp) + { + Precision = Long = 10; + Buf_Type = TYPE_INT; + Rnm = rnm; + *Format.Type = 'N'; + Format.Length = 10; + } // end of RIDBLK constructor + +/***********************************************************************/ +/* ReadColumn: what this routine does is to return the ordinal */ +/* number of the current row in the table (if Rnm is true) or in the */ +/* current file (if Rnm is false) the same except for multiple tables.*/ +/***********************************************************************/ +void RIDBLK::ReadColumn(PGLOBAL g) + { + Value->SetValue(To_Tdb->RowNumber(g, Rnm)); + } // end of ReadColumn + +/***********************************************************************/ +/* FIDBLK constructor for the FILEID special column. */ +/***********************************************************************/ +FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op) + { +//Is_Key = 2; for when the MUL table indexed reading will be implemented. + Precision = Long = _MAX_PATH; + Buf_Type = TYPE_STRING; + *Format.Type = 'C'; + Format.Length = Long; +#if defined(WIN32) + Format.Prec = 1; // Case insensitive +#endif // WIN32 + Constant = (!((PTDBASE)To_Tdb)->GetDef()->GetMultiple() && + To_Tdb->GetAmType() != TYPE_AM_PLG && + To_Tdb->GetAmType() != TYPE_AM_PLM); + Fn = NULL; + } // end of FIDBLK constructor + +/***********************************************************************/ +/* ReadColumn: what this routine does is to return the current */ +/* file ID of the table (can change for Multiple tables). */ +/***********************************************************************/ +void FIDBLK::ReadColumn(PGLOBAL g) + { + if (Fn != ((PTDBASE)To_Tdb)->GetFile(g)) { + char filename[_MAX_PATH]; + + Fn = ((PTDBASE)To_Tdb)->GetFile(g); + PlugSetPath(filename, Fn, ((PTDBASE)To_Tdb)->GetPath()); + + if (Op != OP_XX) { + char buff[_MAX_PATH]; + + Value->SetValue_psz(ExtractFromPath(g, buff, filename, Op)); + } else + Value->SetValue_psz(filename); + + } // endif Fn + + } // end of ReadColumn + +/***********************************************************************/ +/* TIDBLK constructor for the TABID special column. */ +/***********************************************************************/ +TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp) + { +//Is_Key = 2; for when the MUL table indexed reading will be implemented. + Precision = Long = 64; + Buf_Type = TYPE_STRING; + *Format.Type = 'C'; + Format.Length = Long; + Format.Prec = 1; // Case insensitive + Constant = (To_Tdb->GetAmType() != TYPE_AM_TBL); + Tname = NULL; + } // end of TIDBLK constructor + +/***********************************************************************/ +/* ReadColumn: what this routine does is to return the table ID. */ +/***********************************************************************/ +void TIDBLK::ReadColumn(PGLOBAL) + { + if (Tname == NULL) { + Tname = (char*)To_Tdb->GetName(); + Value->SetValue_psz(Tname); + } // endif Tname + + } // end of ReadColumn + +/***********************************************************************/ +/* PRTBLK constructor for the PARTID special column. */ +/***********************************************************************/ +PRTBLK::PRTBLK(PCOLUMN cp) : SPCBLK(cp) + { +//Is_Key = 2; for when the MUL table indexed reading will be implemented. + Precision = Long = 64; + Buf_Type = TYPE_STRING; + *Format.Type = 'C'; + Format.Length = Long; + Format.Prec = 1; // Case insensitive + Constant = true; // TODO: check whether this is true indeed + Pname = NULL; + } // end of PRTBLK constructor + +/***********************************************************************/ +/* ReadColumn: what this routine does is to return the partition ID. */ +/***********************************************************************/ +void PRTBLK::ReadColumn(PGLOBAL g) + { + if (Pname == NULL) { + char *p; + PTDBASE tdbp = (PTDBASE)To_Tdb; + + Pname = tdbp->GetDef()->GetStringCatInfo(g, "partname", "?"); + + p = strrchr(Pname, '#'); + Value->SetValue_psz((p) ? p + 1 : Pname); + } // endif Pname + + } // end of ReadColumn + +/***********************************************************************/ +/* SIDBLK constructor for the SERVID special column. */ +/***********************************************************************/ +SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp) + { +//Is_Key = 2; for when the MUL table indexed reading will be implemented. + Precision = Long = 64; + Buf_Type = TYPE_STRING; + *Format.Type = 'C'; + Format.Length = Long; + Format.Prec = 1; // Case insensitive + Constant = (To_Tdb->GetAmType() != TYPE_AM_TBL); + Sname = NULL; + } // end of TIDBLK constructor + +/***********************************************************************/ +/* ReadColumn: what this routine does is to return the server ID. */ +/***********************************************************************/ +void SIDBLK::ReadColumn(PGLOBAL) + { +//if (Sname == NULL) { + Sname = (char*)To_Tdb->GetServer(); + Value->SetValue_psz(Sname); +// } // endif Sname + + } // end of ReadColumn + diff --git a/storage/connect/colblk.h b/storage/connect/colblk.h index 5e8dc77ff69..c64f9d95129 100644 --- a/storage/connect/colblk.h +++ b/storage/connect/colblk.h @@ -1,7 +1,7 @@ /*************** Colblk H Declares Source Code File (.H) ***************/ /* Name: COLBLK.H Version 1.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* This file contains the COLBLK and derived classes declares. */ /***********************************************************************/ @@ -23,7 +23,7 @@ class DllExport COLBLK : public XOBJECT { // Default constructors used by derived classes COLBLK(PCOLDEF cdp = NULL, PTDB tdbp = NULL, int i = 0); COLBLK(PCOL colp, PTDB tdbp = NULL); // Used in copy process - COLBLK(int n) {} // Used when changing a column class in TDBXML + COLBLK(int) {} // Used when changing a column class in TDBXML public: // Implementation @@ -69,7 +69,7 @@ class DllExport COLBLK : public XOBJECT { virtual bool IsSpecial(void) {return false;} virtual bool Eval(PGLOBAL g); virtual bool SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check); - virtual void SetTo_Val(PVAL valp) {} + virtual void SetTo_Val(PVAL) {} virtual void ReadColumn(PGLOBAL g); virtual void WriteColumn(PGLOBAL g); virtual void Print(PGLOBAL g, FILE *, uint); diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index 7c32c65226d..12b23878891 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -1,4 +1,4 @@ -/* Copyright (C) Olivier Bertrand 2004 - 2012 +/* Copyright (C) Olivier Bertrand 2004 - 2015 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 @@ -237,7 +237,7 @@ PTDB CntGetTDB(PGLOBAL g, LPCSTR name, MODE mode, PHC h) /* OPENTAB: Open a Table. */ /***********************************************************************/ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2, - bool del, PHC h) + bool del, PHC) { char *p; int i, n, rc; diff --git a/storage/connect/filamap.cpp b/storage/connect/filamap.cpp index 1e65fa2a413..cac34827b7a 100644 --- a/storage/connect/filamap.cpp +++ b/storage/connect/filamap.cpp @@ -276,7 +276,7 @@ bool MAPFAM::SetPos(PGLOBAL g, int pos) /***********************************************************************/ /* Record file position in case of UPDATE or DELETE. */ /***********************************************************************/ -bool MAPFAM::RecordPos(PGLOBAL g) +bool MAPFAM::RecordPos(PGLOBAL) { Fpos = Mempos; return false; @@ -285,7 +285,7 @@ bool MAPFAM::RecordPos(PGLOBAL g) /***********************************************************************/ /* Initialize Fpos and Mempos for indexed DELETE. */ /***********************************************************************/ -int MAPFAM::InitDelete(PGLOBAL g, int fpos, int spos) +int MAPFAM::InitDelete(PGLOBAL, int fpos, int spos) { Fpos = Memory + (ptrdiff_t)fpos; Mempos = Memory + (ptrdiff_t)spos; @@ -371,7 +371,7 @@ int MAPFAM::ReadBuffer(PGLOBAL g) /***********************************************************************/ /* WriteBuffer: File write routine for MAP access method. */ /***********************************************************************/ -int MAPFAM::WriteBuffer(PGLOBAL g) +int MAPFAM::WriteBuffer(PGLOBAL g __attribute__((unused))) { #if defined(_DEBUG) // Insert mode is no more handled using file mapping @@ -495,7 +495,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) /***********************************************************************/ /* Table file close routine for MAP access method. */ /***********************************************************************/ -void MAPFAM::CloseTableFile(PGLOBAL g, bool abort) +void MAPFAM::CloseTableFile(PGLOBAL g, bool) { PlugCloseFile(g, To_Fb); To_Fb = NULL; // To get correct file size in Cardinality @@ -551,7 +551,7 @@ int MBKFAM::Cardinality(PGLOBAL g) /***********************************************************************/ /* Skip one record in file. */ /***********************************************************************/ -int MBKFAM::SkipRecord(PGLOBAL g, bool header) +int MBKFAM::SkipRecord(PGLOBAL, bool) { return RC_OK; } // end of SkipRecord @@ -685,7 +685,7 @@ bool MPXFAM::SetPos(PGLOBAL g, int pos) /***********************************************************************/ /* Initialize CurBlk, CurNum, Mempos and Fpos for indexed DELETE. */ /***********************************************************************/ -int MPXFAM::InitDelete(PGLOBAL g, int fpos, int spos) +int MPXFAM::InitDelete(PGLOBAL, int fpos, int) { Fpos = Memory + Headlen + (ptrdiff_t)fpos * Lrecl; Mempos = Fpos + Lrecl; @@ -740,7 +740,7 @@ int MPXFAM::ReadBuffer(PGLOBAL g) /***********************************************************************/ /* WriteBuffer: File write routine for MAP access method. */ /***********************************************************************/ -int MPXFAM::WriteBuffer(PGLOBAL g) +int MPXFAM::WriteBuffer(PGLOBAL g __attribute__((unused))) { #if defined(_DEBUG) // Insert mode is no more handled using file mapping diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp index 7acbba309b2..8a88b743a15 100644 --- a/storage/connect/filamdbf.cpp +++ b/storage/connect/filamdbf.cpp @@ -1,11 +1,11 @@ /*********** File AM Dbf C++ Program Source Code File (.CPP) ****************/ /* PROGRAM NAME: FILAMDBF */ /* ------------- */ -/* Version 1.7 */ +/* Version 1.8 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -1011,7 +1011,7 @@ int DBMFAM::ReadBuffer(PGLOBAL g) /* Data Base delete line routine for DBF access methods. */ /* Deleted lines are just flagged in the first buffer character. */ /****************************************************************************/ -int DBMFAM::DeleteRecords(PGLOBAL g, int irc) +int DBMFAM::DeleteRecords(PGLOBAL, int irc) { if (irc == RC_OK) *Fpos = '*'; diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp index 980d558eee5..4dedd3375b0 100644 --- a/storage/connect/filamfix.cpp +++ b/storage/connect/filamfix.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -102,7 +102,7 @@ bool FIXFAM::SetPos(PGLOBAL g, int pos) /***********************************************************************/ /* Initialize CurBlk and CurNum for indexed DELETE. */ /***********************************************************************/ -int FIXFAM::InitDelete(PGLOBAL g, int fpos, int spos) +int FIXFAM::InitDelete(PGLOBAL, int fpos, int) { CurBlk = fpos / Nrec; CurNum = fpos % Nrec; @@ -690,7 +690,8 @@ bool BGXFAM::BigSeek(PGLOBAL g, HANDLE h, BIGINT pos, int org) /***********************************************************************/ /* Read from a big file. */ /***********************************************************************/ -int BGXFAM::BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req) +int BGXFAM::BigRead(PGLOBAL g __attribute__((unused)), + HANDLE h, void *inbuf, int req) { int rc; diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp index eb4e026ee8a..cce9cec56bd 100644 --- a/storage/connect/filamtxt.cpp +++ b/storage/connect/filamtxt.cpp @@ -436,7 +436,7 @@ err: /* The purpose of this function is to deal with access methods that */ /* are not coherent regarding the use of SetPos and GetPos. */ /***********************************************************************/ -int TXTFAM::InitDelete(PGLOBAL g, int fpos, int spos) +int TXTFAM::InitDelete(PGLOBAL g, int, int) { strcpy(g->Message, "InitDelete should not be used by this table type"); return RC_FX; @@ -519,7 +519,7 @@ int DOSFAM::Cardinality(PGLOBAL g) /* Use BlockTest to reduce the table estimated size. */ /* Note: This function is not really implemented yet. */ /***********************************************************************/ -int DOSFAM::MaxBlkSize(PGLOBAL g, int s) +int DOSFAM::MaxBlkSize(PGLOBAL, int s) { return s; } // end of MaxBlkSize @@ -1272,7 +1272,7 @@ int BLKFAM::Cardinality(PGLOBAL g) /***********************************************************************/ /* Use BlockTest to reduce the table estimated size. */ /***********************************************************************/ -int BLKFAM::MaxBlkSize(PGLOBAL g, int s) +int BLKFAM::MaxBlkSize(PGLOBAL g, int) { int rc = RC_OK, savcur = CurBlk; int size; @@ -1343,7 +1343,7 @@ int BLKFAM::GetNextPos(void) /***********************************************************************/ /* SetPos: Replace the table at the specified position. */ /***********************************************************************/ -bool BLKFAM::SetPos(PGLOBAL g, int pos) +bool BLKFAM::SetPos(PGLOBAL g, int) { strcpy(g->Message, "Blocked variable tables cannot be used indexed"); return true; @@ -1353,7 +1353,7 @@ bool BLKFAM::SetPos(PGLOBAL g, int pos) /* Record file position in case of UPDATE or DELETE. */ /* Not used yet for blocked tables. */ /***********************************************************************/ -bool BLKFAM::RecordPos(PGLOBAL g) +bool BLKFAM::RecordPos(PGLOBAL) { Fpos = (CurNum + Nrec * CurBlk); // Computed file index return false; @@ -1362,7 +1362,7 @@ bool BLKFAM::RecordPos(PGLOBAL g) /***********************************************************************/ /* Skip one record in file. */ /***********************************************************************/ -int BLKFAM::SkipRecord(PGLOBAL g, bool header) +int BLKFAM::SkipRecord(PGLOBAL, bool header) { if (header) { // For Delete diff --git a/storage/connect/filamtxt.h b/storage/connect/filamtxt.h index 1c8ea1e3a6c..ae8f74a9830 100644 --- a/storage/connect/filamtxt.h +++ b/storage/connect/filamtxt.h @@ -57,8 +57,8 @@ class DllExport TXTFAM : public BLOCK { virtual int GetFileLength(PGLOBAL g); virtual int Cardinality(PGLOBAL g); virtual int MaxBlkSize(PGLOBAL g, int s); - virtual bool AllocateBuffer(PGLOBAL g) {return false;} - virtual void ResetBuffer(PGLOBAL g) {} + virtual bool AllocateBuffer(PGLOBAL) {return false;} + virtual void ResetBuffer(PGLOBAL) {} virtual int GetNerr(void) {return 0;} virtual int GetRowID(void) = 0; virtual bool RecordPos(PGLOBAL g) = 0; diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp index e1f11bbf4cf..60a8875e015 100755 --- a/storage/connect/filamvct.cpp +++ b/storage/connect/filamvct.cpp @@ -279,7 +279,7 @@ bool VCTFAM::SetBlockInfo(PGLOBAL g) /***********************************************************************/ /* Use BlockTest to reduce the table estimated size. */ /***********************************************************************/ -int VCTFAM::MaxBlkSize(PGLOBAL g, int s) +int VCTFAM::MaxBlkSize(PGLOBAL g, int) { int rc = RC_OK, savcur = CurBlk; int size; @@ -1716,7 +1716,7 @@ int VCMFAM::DeleteRecords(PGLOBAL g, int irc) /***********************************************************************/ /* Move intermediate deleted or updated lines. */ /***********************************************************************/ -bool VCMFAM::MoveIntermediateLines(PGLOBAL g, bool *b) +bool VCMFAM::MoveIntermediateLines(PGLOBAL, bool *) { int i, m, n; @@ -1765,7 +1765,7 @@ bool VCMFAM::MoveIntermediateLines(PGLOBAL g, bool *b) /***********************************************************************/ /* Data Base close routine for VMP access method. */ /***********************************************************************/ -void VCMFAM::CloseTableFile(PGLOBAL g, bool abort) +void VCMFAM::CloseTableFile(PGLOBAL g, bool) { int wrc = RC_OK; MODE mode = Tdbp->GetMode(); @@ -1800,7 +1800,7 @@ void VCMFAM::CloseTableFile(PGLOBAL g, bool abort) /***********************************************************************/ /* ReadBlock: Read column values from current block. */ /***********************************************************************/ -bool VCMFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) +bool VCMFAM::ReadBlock(PGLOBAL, PVCTCOL colp) { char *mempos; int i = colp->Index - 1; @@ -1830,7 +1830,7 @@ bool VCMFAM::ReadBlock(PGLOBAL g, PVCTCOL colp) /* the mapped file, except when checking for Update but in this case */ /* we do not want to write back the modifications either. */ /***********************************************************************/ -bool VCMFAM::WriteBlock(PGLOBAL g, PVCTCOL colp) +bool VCMFAM::WriteBlock(PGLOBAL, PVCTCOL colp __attribute__((unused))) { #if defined(_DEBUG) char *mempos; @@ -2124,7 +2124,7 @@ bool VECFAM::AllocateBuffer(PGLOBAL g) /***********************************************************************/ /* Do initial action when inserting. */ /***********************************************************************/ -bool VECFAM::InitInsert(PGLOBAL g) +bool VECFAM::InitInsert(PGLOBAL) { // We come here in MODE_INSERT only CurBlk = 0; @@ -2365,7 +2365,7 @@ bool VECFAM::MoveLines(PGLOBAL g) /***********************************************************************/ /* Move intermediate deleted or updated lines. */ /***********************************************************************/ -bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *bn) +bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *) { int i, n; bool b = false; @@ -3009,7 +3009,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for VMP access method. */ /***********************************************************************/ -void VMPFAM::CloseTableFile(PGLOBAL g, bool abort) +void VMPFAM::CloseTableFile(PGLOBAL g, bool) { if (Tdbp->GetMode() == MODE_DELETE) { // Set Block and Nrec values for TDBVCT::MakeBlockValues diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index 1288689325c..54af93e11fa 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -247,7 +247,7 @@ int ZIPFAM::GetNextPos(void) /***********************************************************************/ /* SetPos: Replace the table at the specified position. */ /***********************************************************************/ -bool ZIPFAM::SetPos(PGLOBAL g, int pos) +bool ZIPFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) { sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP"); return true; @@ -267,7 +267,7 @@ bool ZIPFAM::SetPos(PGLOBAL g, int pos) /***********************************************************************/ /* Record file position in case of UPDATE or DELETE. */ /***********************************************************************/ -bool ZIPFAM::RecordPos(PGLOBAL g) +bool ZIPFAM::RecordPos(PGLOBAL) { Zpos = gztell(Zfile); return false; @@ -376,7 +376,7 @@ int ZIPFAM::WriteBuffer(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for ZDOS access method. (NIY) */ /***********************************************************************/ -int ZIPFAM::DeleteRecords(PGLOBAL g, int irc) +int ZIPFAM::DeleteRecords(PGLOBAL g, int) { strcpy(g->Message, MSG(NO_ZIP_DELETE)); return RC_FX; @@ -385,7 +385,7 @@ int ZIPFAM::DeleteRecords(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for DOS access method. */ /***********************************************************************/ -void ZIPFAM::CloseTableFile(PGLOBAL g, bool abort) +void ZIPFAM::CloseTableFile(PGLOBAL, bool) { int rc = gzclose(Zfile); @@ -431,7 +431,7 @@ ZBKFAM::ZBKFAM(PZBKFAM txfp) : ZIPFAM(txfp) /***********************************************************************/ /* Use BlockTest to reduce the table estimated size. */ /***********************************************************************/ -int ZBKFAM::MaxBlkSize(PGLOBAL g, int s) +int ZBKFAM::MaxBlkSize(PGLOBAL g, int) { int rc = RC_OK, savcur = CurBlk; int size; @@ -503,7 +503,7 @@ int ZBKFAM::GetPos(void) /* Record file position in case of UPDATE or DELETE. */ /* Not used yet for fixed tables. */ /***********************************************************************/ -bool ZBKFAM::RecordPos(PGLOBAL g) +bool ZBKFAM::RecordPos(PGLOBAL /*g*/) { //strcpy(g->Message, "RecordPos not implemented for zip blocked tables"); //return true; @@ -513,7 +513,7 @@ bool ZBKFAM::RecordPos(PGLOBAL g) /***********************************************************************/ /* Skip one record in file. */ /***********************************************************************/ -int ZBKFAM::SkipRecord(PGLOBAL g, bool header) +int ZBKFAM::SkipRecord(PGLOBAL /*g*/, bool) { //strcpy(g->Message, "SkipRecord not implemented for zip blocked tables"); //return RC_FX; @@ -668,7 +668,7 @@ int ZBKFAM::DeleteRecords(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for ZBK access method. */ /***********************************************************************/ -void ZBKFAM::CloseTableFile(PGLOBAL g, bool abort) +void ZBKFAM::CloseTableFile(PGLOBAL g, bool) { int rc = RC_OK; @@ -1060,7 +1060,7 @@ int ZLBFAM::GetNextPos(void) /***********************************************************************/ /* SetPos: Replace the table at the specified position. */ /***********************************************************************/ -bool ZLBFAM::SetPos(PGLOBAL g, int pos) +bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) { sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP"); return true; @@ -1350,7 +1350,7 @@ bool ZLBFAM::WriteCompressedBuffer(PGLOBAL g) /***********************************************************************/ /* Table file close routine for DOS access method. */ /***********************************************************************/ -void ZLBFAM::CloseTableFile(PGLOBAL g, bool abort) +void ZLBFAM::CloseTableFile(PGLOBAL g, bool) { int rc = RC_OK; diff --git a/storage/connect/filter.h b/storage/connect/filter.h index 78e066d9ab7..ab7c2139b68 100644 --- a/storage/connect/filter.h +++ b/storage/connect/filter.h @@ -1,7 +1,7 @@ /*************** Filter H Declares Source Code File (.H) ***************/ /* Name: FILTER.H Version 1.2 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2010-2012 */ +/* (C) Copyright to the author Olivier BERTRAND 2010-2015 */ /* */ /* This file contains the FILTER and derived classes declares. */ /***********************************************************************/ @@ -105,7 +105,7 @@ class FILTERX : public FILTER { virtual bool Eval(PGLOBAL) = 0; // just to prevent direct FILTERX use // Fake operator new used to change a filter into a derived filter - void * operator new(size_t size, PFIL filp) {return filp;} + void * operator new(size_t, PFIL filp) {return filp;} #if defined(WIN32) // Avoid warning C4291 by defining a matching dummy delete operator void operator delete(void *, PFIL) {} diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index f2827f56cd8..2449a1fdb97 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -193,7 +193,7 @@ extern "C" { /* Utility functions. */ /***********************************************************************/ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); -PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info); +PQRYRES VirColumns(PGLOBAL g, bool info); PQRYRES JSONColumns(PGLOBAL g, char *dp, const char *fn, char *objn, int pretty, int lvl, int mxr, bool info); PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info); @@ -5337,7 +5337,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, break; #endif // PIVOT_SUPPORT case TAB_VIR: - qrp= VirColumns(g, tab, (char*)db, fnc == FNC_COL); + qrp= VirColumns(g, fnc == FNC_COL); break; case TAB_JSON: qrp= JSONColumns(g, (char*)db, fn, objn, pty, lrecl, lvl, fnc == FNC_COL); diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 1afd79bec05..1ad33d83068 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -296,7 +296,7 @@ my_bool Json_Value_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } // end of Json_Value_init char *Json_Value(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; PJVAL jvp; @@ -329,7 +329,7 @@ my_bool Json_Array_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } // end of Json_Array_init char *Json_Array(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; uint i; @@ -376,7 +376,7 @@ my_bool Json_Array_Add_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } // end of Json_Array_Add_init char *Json_Array_Add(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; PJVAL jvp; @@ -429,7 +429,7 @@ my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } // end of Json_Array_Delete_init char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; int n; @@ -482,7 +482,7 @@ my_bool Json_Object_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } // end of Json_Object_init char *Json_Object(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; uint i; @@ -520,7 +520,7 @@ my_bool Json_Object_Nonull_init(UDF_INIT *initid, UDF_ARGS *args, } // end of Json_Object_Nonull_init char *Json_Object_Nonull(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) + unsigned long *res_length, char *, char *) { char *str; uint i; @@ -574,8 +574,7 @@ my_bool Json_Array_Grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return false; } // end of Json_Array_Grp_init -void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args, - char *is_null, char *error) +void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*) { PGLOBAL g = (PGLOBAL)initid->ptr; PJAR arp = (PJAR)g->Activityp; @@ -585,8 +584,8 @@ void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args, } // end of Json_Array_Grp_add -char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) +char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *, char *result, + unsigned long *res_length, char *, char *) { char *str; PGLOBAL g = (PGLOBAL)initid->ptr; @@ -605,7 +604,7 @@ char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result, return str; } // end of Json_Array_Grp -void Json_Array_Grp_clear(UDF_INIT *initid, char *is_null, char *error) +void Json_Array_Grp_clear(UDF_INIT *initid, char*, char*) { PGLOBAL g = (PGLOBAL)initid->ptr; @@ -646,8 +645,7 @@ my_bool Json_Object_Grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return false; } // end of Json_Object_Grp_init -void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args, - char *is_null, char *error) +void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*) { PGLOBAL g = (PGLOBAL)initid->ptr; PJOB objp = (PJOB)g->Activityp; @@ -657,8 +655,8 @@ void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args, } // end of Json_Object_Grp_add -char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *is_null, char *error) +char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *, char *result, + unsigned long *res_length, char *, char *) { char *str; PGLOBAL g = (PGLOBAL)initid->ptr; @@ -675,7 +673,7 @@ char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result, return str; } // end of Json_Object_Grp -void Json_Object_Grp_clear(UDF_INIT *initid, char *is_null, char *error) +void Json_Object_Grp_clear(UDF_INIT *initid, char*, char*) { PGLOBAL g = (PGLOBAL)initid->ptr; diff --git a/storage/connect/mycat.h b/storage/connect/mycat.h index cdbe4e5bca9..f7c4c70eaf5 100644 --- a/storage/connect/mycat.h +++ b/storage/connect/mycat.h @@ -1,4 +1,4 @@ -/* Copyright (C) Olivier Bertrand 2004 - 2013 +/* Copyright (C) Olivier Bertrand 2004 - 2015 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 @@ -98,7 +98,7 @@ class MYCAT : public CATALOG { void Reset(void); //void SetDataPath(PGLOBAL g, const char *path) // {SetPath(g, &DataPath, path);} - bool StoreIndex(PGLOBAL g, PTABDEF defp) {return false;} // Temporary + bool StoreIndex(PGLOBAL, PTABDEF) {return false;} // Temporary PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name, LPCSTR type, PRELDEF *prp = NULL); PTDB GetTable(PGLOBAL g, PTABLE tablep, diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 47d781d9ff6..2b958b512f3 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2007-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2007-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -720,7 +720,7 @@ int MYSQLC::ExecSQL(PGLOBAL g, const char *query, int *w) /***********************************************************************/ /* Get table size by executing "select count(*) from table_name". */ /***********************************************************************/ -int MYSQLC::GetTableSize(PGLOBAL g, PSZ query) +int MYSQLC::GetTableSize(PGLOBAL g __attribute__((unused)), PSZ query) { if (mysql_real_query(m_DB, query, strlen(query))) { #if defined(_DEBUG) diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 32f6d6f8366..a2b1baf1249 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -888,7 +888,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md) /* Close file routine: the purpose of this routine is to avoid */ /* double closing that freeze the system on some Unix platforms. */ /***********************************************************************/ -int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all) +int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) { int rc = 0; diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 47f825e965d..d0483b5075d 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -548,7 +548,7 @@ bool OEMDEF::DeleteTableFile(PGLOBAL g) /***********************************************************************/ /* Define: initialize the table definition block from XDB file. */ /***********************************************************************/ -bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int) { Module = GetStringCatInfo(g, "Module", ""); Subtype = GetStringCatInfo(g, "Subtype", Module); @@ -715,7 +715,7 @@ COLDEF::COLDEF(void) : COLCRT() /***********************************************************************/ /* Define: initialize a column definition from a COLINFO structure. */ /***********************************************************************/ -int COLDEF::Define(PGLOBAL g, void *memp, PCOLINFO cfp, int poff) +int COLDEF::Define(PGLOBAL g, void *, PCOLINFO cfp, int poff) { Name = (PSZ)PlugDup(g, cfp->Name); diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index 13bd392b706..ec70f18e151 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -1,7 +1,7 @@ /*************** RelDef H Declares Source Code File (.H) ***************/ /* Name: RELDEF.H Version 1.5 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */ /* */ /* This file contains the DEF classes definitions. */ /***********************************************************************/ @@ -89,7 +89,7 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */ bool IsReadOnly(void) {return Read_Only;} virtual AMT GetDefType(void) {return TYPE_AM_TAB;} virtual PIXDEF GetIndx(void) {return NULL;} - virtual void SetIndx(PIXDEF xp) {} + virtual void SetIndx(PIXDEF) {} virtual bool IsHuge(void) {return false;} const CHARSET_INFO *data_charset() {return m_data_charset;} diff --git a/storage/connect/tabcol.cpp b/storage/connect/tabcol.cpp index 8f350c6f074..662c0b514cf 100644 --- a/storage/connect/tabcol.cpp +++ b/storage/connect/tabcol.cpp @@ -1,7 +1,7 @@ /************* TabCol C++ Functions Source Code File (.CPP) ************/ /* Name: TABCOL.CPP Version 2.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2013 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ /* */ /* This file contains the PlugDB++ XTAB, COLUMN and XORDER methods. */ /***********************************************************************/ @@ -91,7 +91,7 @@ void XTAB::Print(PGLOBAL g, FILE *f, uint n) /***********************************************************************/ /* Make string output of XTAB contents. */ /***********************************************************************/ -void XTAB::Print(PGLOBAL g, char *ps, uint z) +void XTAB::Print(PGLOBAL, char *ps, uint z) { char buf[128]; int i, n = (int)z - 1; @@ -125,7 +125,7 @@ COLUMN::COLUMN(LPCSTR name) : Name(name) /***********************************************************************/ /* COLUMN SetFormat: should never be called. */ /***********************************************************************/ -bool COLUMN::SetFormat(PGLOBAL g, FORMAT& fmt) +bool COLUMN::SetFormat(PGLOBAL g, FORMAT&) { strcpy(g->Message, MSG(NO_FORMAT_COL)); return true; @@ -154,7 +154,7 @@ void COLUMN::Print(PGLOBAL g, FILE *f, uint n) /***********************************************************************/ /* Make string output of COLUMN contents. */ /***********************************************************************/ -void COLUMN::Print(PGLOBAL g, char *ps, uint z) +void COLUMN::Print(PGLOBAL, char *ps, uint z) { char buf[80]; diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index ba22da52998..37bd94cf1bb 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -117,7 +117,7 @@ DOSDEF::DOSDEF(void) /***********************************************************************/ /* DefineAM: define specific AM block values from XDB file. */ /***********************************************************************/ -bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int) { char buf[8]; bool map = (am && (*am == 'M' || *am == 'm')); @@ -303,7 +303,7 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf) /***********************************************************************/ /* InvalidateIndex: mark all indexes as invalid. */ /***********************************************************************/ -bool DOSDEF::InvalidateIndex(PGLOBAL g) +bool DOSDEF::InvalidateIndex(PGLOBAL) { if (To_Indx) for (PIXDEF xp = To_Indx; xp; xp = xp->Next) @@ -1736,15 +1736,16 @@ err: /***********************************************************************/ /* Make a dynamic index. */ /***********************************************************************/ -bool TDBDOS::InitialyzeIndex(PGLOBAL g, PIXDEF xdp, bool sorted) +bool TDBDOS::InitialyzeIndex(PGLOBAL g, volatile PIXDEF xdp, bool sorted) { int k, rc; - bool brc, dynamic; + volatile bool dynamic; + bool brc; PCOL colp; PCOLDEF cdp; PVAL valp; PXLOAD pxp; - PKXBASE kxp; + volatile PKXBASE kxp; PKPDEF kdp; if (!xdp && !(xdp = To_Xdp)) { @@ -1864,7 +1865,7 @@ int TDBDOS::GetProgCur(void) /***********************************************************************/ /* RowNumber: return the ordinal number of the current row. */ /***********************************************************************/ -int TDBDOS::RowNumber(PGLOBAL g, bool b) +int TDBDOS::RowNumber(PGLOBAL g, bool) { if (To_Kindex) { /*******************************************************************/ @@ -1944,7 +1945,7 @@ int TDBDOS::Cardinality(PGLOBAL g) rec = ((PDOSDEF)To_Def)->Ending; if (AvgLen <= 0) // No given average estimate - rec += EstimatedLength(g); + rec += EstimatedLength(); else // An estimate was given for the average record length rec += AvgLen; @@ -1988,7 +1989,7 @@ int TDBDOS::GetMaxSize(PGLOBAL g) /* Estimate the number of lines in the table (if not known) by */ /* dividing the file length by minimum record length. */ /*****************************************************************/ - rec = EstimatedLength(g) + ((PDOSDEF)To_Def)->Ending; + rec = EstimatedLength() + ((PDOSDEF)To_Def)->Ending; MaxSize = (len + rec - 1) / rec; if (trace) @@ -2005,7 +2006,7 @@ int TDBDOS::GetMaxSize(PGLOBAL g) /***********************************************************************/ /* DOS EstimatedLength. Returns an estimated minimum line length. */ /***********************************************************************/ -int TDBDOS::EstimatedLength(PGLOBAL g) +int TDBDOS::EstimatedLength(void) { int dep = 0; PCOLDEF cdp = To_Def->GetCols(); @@ -2023,7 +2024,7 @@ int TDBDOS::EstimatedLength(PGLOBAL g) /***********************************************************************/ /* DOS tables favor the use temporary files for Update. */ /***********************************************************************/ -bool TDBDOS::IsUsingTemp(PGLOBAL g) +bool TDBDOS::IsUsingTemp(PGLOBAL) { USETEMP utp = UseTemp(); @@ -2183,7 +2184,7 @@ int TDBDOS::ReadDB(PGLOBAL g) /***********************************************************************/ /* PrepareWriting: Prepare the line to write. */ /***********************************************************************/ -bool TDBDOS::PrepareWriting(PGLOBAL g) +bool TDBDOS::PrepareWriting(PGLOBAL) { if (!Ftype && (Mode == MODE_INSERT || Txfp->GetUseTemp())) { char *p; diff --git a/storage/connect/tabdos.h b/storage/connect/tabdos.h index b7150294e9b..9115b1fae86 100644 --- a/storage/connect/tabdos.h +++ b/storage/connect/tabdos.h @@ -1,7 +1,7 @@ /*************** TabDos H Declares Source Code File (.H) ***************/ /* Name: TABDOS.H Version 3.3 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */ /* */ /* This file contains the DOS classes declares. */ /***********************************************************************/ @@ -123,11 +123,11 @@ class DllExport TDBDOS : public TDBASE { // Implementation virtual AMT GetAmType(void) {return Txfp->GetAmType();} - virtual PSZ GetFile(PGLOBAL g) {return Txfp->To_File;} - virtual void SetFile(PGLOBAL g, PSZ fn) {Txfp->To_File = fn;} + virtual PSZ GetFile(PGLOBAL) {return Txfp->To_File;} + virtual void SetFile(PGLOBAL, PSZ fn) {Txfp->To_File = fn;} virtual void SetAbort(bool b) {Abort = b;} virtual RECFM GetFtype(void) {return Ftype;} - virtual bool SkipHeader(PGLOBAL g) {return false;} + virtual bool SkipHeader(PGLOBAL) {return false;} virtual void RestoreNrec(void) {Txfp->SetNrec(1);} virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBDOS(g, this);} @@ -149,7 +149,7 @@ class DllExport TDBDOS : public TDBASE { // Database routines virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n); - virtual char *GetOpenMode(PGLOBAL g, char *opmode) {return NULL;} + virtual char *GetOpenMode(PGLOBAL, char*) {return NULL;} virtual int GetFileLength(PGLOBAL g) {return Txfp->GetFileLength(g);} virtual int GetProgMax(PGLOBAL g); virtual int GetProgCur(void); @@ -168,7 +168,7 @@ class DllExport TDBDOS : public TDBASE { virtual int ReadBuffer(PGLOBAL g) {return Txfp->ReadBuffer(g);} // Specific routine - virtual int EstimatedLength(PGLOBAL g); + virtual int EstimatedLength(void); // Optimization routines virtual int MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add); diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 77e47e6f8dd..5cfd5a726ef 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -271,7 +271,7 @@ int TDBFIX::RowNumber(PGLOBAL g, bool b) /***********************************************************************/ /* FIX tables don't use temporary files except if specified as do it. */ /***********************************************************************/ -bool TDBFIX::IsUsingTemp(PGLOBAL g) +bool TDBFIX::IsUsingTemp(PGLOBAL) { // Not ready yet to handle using a temporary file with mapping // or while deleting from DBF files. diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index d5f8dc50a89..a5e14e1b81f 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2001 - 2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2001 - 2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -625,7 +625,7 @@ bool TDBCSV::CheckErr(void) /***********************************************************************/ /* CSV EstimatedLength. Returns an estimated minimum line length. */ /***********************************************************************/ -int TDBCSV::EstimatedLength(PGLOBAL g) +int TDBCSV::EstimatedLength(void) { int n = 0; PCOLDEF cdp; @@ -1118,7 +1118,7 @@ PCOL TDBFMT::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) /* FMT EstimatedLength. Returns an estimated minimum line length. */ /* The big problem here is how can we astimated that minimum ? */ /***********************************************************************/ -int TDBFMT::EstimatedLength(PGLOBAL g) +int TDBFMT::EstimatedLength(void) { // This is rather stupid !!! return ((PDOSDEF)To_Def)->GetEnding() + (int)((Lrecl / 10) + 1); diff --git a/storage/connect/tabfmt.h b/storage/connect/tabfmt.h index 8a1e1f17561..ce80a276cdc 100644 --- a/storage/connect/tabfmt.h +++ b/storage/connect/tabfmt.h @@ -75,7 +75,7 @@ class TDBCSV : public TDBDOS { virtual int ReadBuffer(PGLOBAL g); // Physical file read // Specific routines - virtual int EstimatedLength(PGLOBAL g); + virtual int EstimatedLength(void); virtual bool SkipHeader(PGLOBAL g); virtual bool CheckErr(void); @@ -157,7 +157,7 @@ class TDBFMT : public TDBCSV { virtual int ReadBuffer(PGLOBAL g); // Physical file read // Specific routines - virtual int EstimatedLength(PGLOBAL g); + virtual int EstimatedLength(void); protected: virtual bool PrepareWriting(PGLOBAL g) diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 0231b369fc1..f22bdd15528 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -78,11 +78,13 @@ PQRYRES JSONColumns(PGLOBAL g, char *dp, const char *fn, char *objn, PJVAL jvp; PJOB row; PJDEF tdp; - TDBJSN *tjnp; - PJTDB tjsp; + TDBJSN *tjnp = NULL; + PJTDB tjsp = NULL; PQRYRES qrp; PCOLRES crp; + jcol.Name = jcol.Fmt = NULL; + if (info) { length[0] = 128; length[7] = 256; @@ -362,7 +364,7 @@ JSONDEF::JSONDEF(void) /***********************************************************************/ /* DefineAM: define specific AM block values. */ /***********************************************************************/ -bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) { Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT); Objname = GetStringCatInfo(g, "Object", NULL); @@ -506,7 +508,7 @@ PCOL TDBJSN::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) /***********************************************************************/ /* InsertSpecialColumn: Put a special column ahead of the column list.*/ /***********************************************************************/ -PCOL TDBJSN::InsertSpecialColumn(PGLOBAL g, PCOL colp) +PCOL TDBJSN::InsertSpecialColumn(PCOL colp) { if (!colp->IsSpecial()) return NULL; @@ -1486,7 +1488,7 @@ int TDBJSON::MakeNewDoc(PGLOBAL g) /***********************************************************************/ int TDBJSON::MakeDocument(PGLOBAL g) { - char *p, *memory, *objpath, *key; + char *p, *memory, *objpath, *key = NULL; int len, i = 0; MODE mode = Mode; PJSON jsp; @@ -1646,7 +1648,7 @@ void TDBJSON::ResetSize(void) /***********************************************************************/ /* TDBJSON is not indexable. */ /***********************************************************************/ -int TDBJSON::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add) +int TDBJSON::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool) { if (pxdf) { strcpy(g->Message, "JSON not indexable when pretty = 2"); @@ -1677,7 +1679,7 @@ int TDBJSON::GetRecpos(void) /***********************************************************************/ /* Set the position in the table. */ /***********************************************************************/ -bool TDBJSON::SetRecpos(PGLOBAL g, int recpos) +bool TDBJSON::SetRecpos(PGLOBAL, int recpos) { #if 0 union { @@ -1739,7 +1741,7 @@ bool TDBJSON::OpenDB(PGLOBAL g) /***********************************************************************/ /* ReadDB: Data Base read routine for JSON access method. */ /***********************************************************************/ -int TDBJSON::ReadDB(PGLOBAL g) +int TDBJSON::ReadDB(PGLOBAL) { int rc; diff --git a/storage/connect/tabjson.h b/storage/connect/tabjson.h index 10b9a9a9cc3..dc682e067e3 100644 --- a/storage/connect/tabjson.h +++ b/storage/connect/tabjson.h @@ -82,7 +82,7 @@ class TDBJSN : public TDBDOS { // Methods virtual PTDB CopyOne(PTABS t); virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n); - virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp); + virtual PCOL InsertSpecialColumn(PCOL colp); virtual int RowNumber(PGLOBAL g, bool b = FALSE) {return (b) ? N : Fpos + 1;} diff --git a/storage/connect/table.cpp b/storage/connect/table.cpp index d163c443cd5..933e072c1bb 100644 --- a/storage/connect/table.cpp +++ b/storage/connect/table.cpp @@ -1,7 +1,7 @@ /************** Table C++ Functions Source Code File (.CPP) ************/ /* Name: TABLE.CPP Version 2.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */ /* */ /* This file contains the TBX, TDB and OPJOIN classes functions. */ /***********************************************************************/ @@ -74,7 +74,7 @@ TDB::TDB(PTDB tdbp) : Tdb_No(++Tnum) /***********************************************************************/ /* RowNumber: returns the current row ordinal number. */ /***********************************************************************/ -int TDB::RowNumber(PGLOBAL g, bool b) +int TDB::RowNumber(PGLOBAL g, bool) { sprintf(g->Message, MSG(ROWID_NOT_IMPL), GetAmName(g, GetAmType())); return 0; @@ -122,7 +122,7 @@ void TDB::Print(PGLOBAL g, FILE *f, uint n) } // end of Print -void TDB::Print(PGLOBAL g, char *ps, uint z) +void TDB::Print(PGLOBAL, char *ps, uint) { sprintf(ps, "R%d.%s", Tdb_No, Name); } // end of Print @@ -263,7 +263,7 @@ PCOL TDBASE::ColDB(PGLOBAL g, PSZ name, int num) /***********************************************************************/ /* InsertSpecialColumn: Put a special column ahead of the column list.*/ /***********************************************************************/ -PCOL TDBASE::InsertSpecialColumn(PGLOBAL g, PCOL colp) +PCOL TDBASE::InsertSpecialColumn(PCOL colp) { if (!colp->IsSpecial()) return NULL; @@ -327,7 +327,7 @@ PCOL TDBASE::InsertSpcBlk(PGLOBAL g, PCOLDEF cdp) return NULL; } // endif's name - if (!(colp = InsertSpecialColumn(g, colp))) { + if (!(colp = InsertSpecialColumn(colp))) { sprintf(g->Message, MSG(BAD_SPECIAL_COL), name); return NULL; } // endif Insert @@ -338,7 +338,7 @@ PCOL TDBASE::InsertSpcBlk(PGLOBAL g, PCOLDEF cdp) /***********************************************************************/ /* ResetTableOpt: Wrong for this table type. */ /***********************************************************************/ -int TDBASE::ResetTableOpt(PGLOBAL g, bool dop, bool dox) +int TDBASE::ResetTableOpt(PGLOBAL g, bool, bool) { strcpy(g->Message, "This table is not indexable"); return RC_INFO; @@ -365,7 +365,7 @@ void TDBASE::ResetKindex(PGLOBAL g, PKXBASE kxp) /***********************************************************************/ /* SetRecpos: Replace the table at the specified position. */ /***********************************************************************/ -bool TDBASE::SetRecpos(PGLOBAL g, int recpos) +bool TDBASE::SetRecpos(PGLOBAL g, int) { strcpy(g->Message, MSG(SETRECPOS_NIY)); return true; @@ -386,7 +386,7 @@ void TDBASE::PrintAM(FILE *f, char *m) /* Two questions here: exact meaning of U_J_INT ? */ /* Why is the eventual reference to To_Key_Col not marked U_J_EXT ? */ /***********************************************************************/ -void TDBASE::MarkDB(PGLOBAL g, PTDB tdb2) +void TDBASE::MarkDB(PGLOBAL, PTDB tdb2) { if (trace) htrc("DOS MarkDB: tdbp=%p tdb2=%p\n", this, tdb2); @@ -453,7 +453,7 @@ bool TDBCAT::Initialize(PGLOBAL g) /***********************************************************************/ /* CAT: Get the number of properties. */ /***********************************************************************/ -int TDBCAT::GetMaxSize(PGLOBAL g) +int TDBCAT::GetMaxSize(PGLOBAL g __attribute__((unused))) { if (MaxSize < 0) { // if (Initialize(g)) @@ -528,7 +528,7 @@ bool TDBCAT::InitCol(PGLOBAL g) /***********************************************************************/ /* SetRecpos: Replace the table at the specified position. */ /***********************************************************************/ -bool TDBCAT::SetRecpos(PGLOBAL g, int recpos) +bool TDBCAT::SetRecpos(PGLOBAL, int recpos) { N = recpos - 1; return false; @@ -537,7 +537,7 @@ bool TDBCAT::SetRecpos(PGLOBAL g, int recpos) /***********************************************************************/ /* Data Base read routine for CAT access method. */ /***********************************************************************/ -int TDBCAT::ReadDB(PGLOBAL g) +int TDBCAT::ReadDB(PGLOBAL) { return (++N < Qrp->Nblin) ? RC_OK : RC_EF; } // end of ReadDB @@ -554,7 +554,7 @@ int TDBCAT::WriteDB(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for CAT access methods. */ /***********************************************************************/ -int TDBCAT::DeleteDB(PGLOBAL g, int irc) +int TDBCAT::DeleteDB(PGLOBAL g, int) { strcpy(g->Message, "Delete not enabled for CAT tables"); return RC_FX; @@ -563,7 +563,7 @@ int TDBCAT::DeleteDB(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for WMI access method. */ /***********************************************************************/ -void TDBCAT::CloseDB(PGLOBAL g) +void TDBCAT::CloseDB(PGLOBAL) { // Nothing to do } // end of CloseDB @@ -584,7 +584,7 @@ CATCOL::CATCOL(PCOLDEF cdp, PTDB tdbp, int n) /***********************************************************************/ /* Read the next Data Source elements. */ /***********************************************************************/ -void CATCOL::ReadColumn(PGLOBAL g) +void CATCOL::ReadColumn(PGLOBAL) { // Get the value of the Name or Description property if (Crp->Kdata) diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp index 94950584c9b..12e8de2c808 100644 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -561,7 +561,7 @@ int TDBMUL::WriteDB(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for MUL access method. */ /***********************************************************************/ -int TDBMUL::DeleteDB(PGLOBAL g, int irc) +int TDBMUL::DeleteDB(PGLOBAL g, int) { // When implementing DELETE_MODE InitFileNames must be updated to // eliminate CRLF under Windows if the file is read in binary. @@ -586,7 +586,7 @@ void TDBMUL::CloseDB(PGLOBAL g) /***********************************************************************/ /* DefineAM: define specific AM block values from XDB file. */ /***********************************************************************/ -bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR, int) { Desc = Fn = GetStringCatInfo(g, "Filename", NULL); Incl = (GetIntCatInfo("Subdir", 0) != 0); @@ -597,7 +597,7 @@ bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new Table Description Block. */ /***********************************************************************/ -PTDB DIRDEF::GetTable(PGLOBAL g, MODE m) +PTDB DIRDEF::GetTable(PGLOBAL g, MODE) { #if 0 if (Huge) @@ -865,7 +865,7 @@ int TDBDIR::WriteDB(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for DIR access method. */ /***********************************************************************/ -int TDBDIR::DeleteDB(PGLOBAL g, int irc) +int TDBDIR::DeleteDB(PGLOBAL g, int) { strcpy(g->Message, MSG(TABDIR_READONLY)); return RC_FX; // NIY @@ -874,7 +874,7 @@ int TDBDIR::DeleteDB(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for MUL access method. */ /***********************************************************************/ -void TDBDIR::CloseDB(PGLOBAL g) +void TDBDIR::CloseDB(PGLOBAL) { #if defined(WIN32) // Close the search handle. @@ -895,7 +895,7 @@ void TDBDIR::CloseDB(PGLOBAL g) /***********************************************************************/ /* DIRCOL public constructor. */ /***********************************************************************/ -DIRCOL::DIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) +DIRCOL::DIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ) : COLBLK(cdp, tdbp, i) { if (cprec) { diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index b18e4da2ec4..cb7011822d8 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -5,7 +5,7 @@ /* */ /* AUTHOR: */ /* ------- */ -/* Olivier BERTRAND 2007-2014 */ +/* Olivier BERTRAND 2007-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -307,7 +307,7 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url, bool b) /***********************************************************************/ /* DefineAM: define specific AM block values from XCV file. */ /***********************************************************************/ -bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int) { char *url; @@ -380,7 +380,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB MYSQLDEF::GetTable(PGLOBAL g, MODE m) +PTDB MYSQLDEF::GetTable(PGLOBAL g, MODE) { if (Xsrc) return new(g) TDBMYEXC(this); @@ -438,7 +438,7 @@ TDBMYSQL::TDBMYSQL(PMYDEF tdp) : TDBASE(tdp) Nparm = 0; } // end of TDBMYSQL constructor -TDBMYSQL::TDBMYSQL(PGLOBAL g, PTDBMY tdbp) : TDBASE(tdbp) +TDBMYSQL::TDBMYSQL(PTDBMY tdbp) : TDBASE(tdbp) { Host = tdbp->Host; Database = tdbp->Database; @@ -468,7 +468,7 @@ PTDB TDBMYSQL::CopyOne(PTABS t) PCOL cp1, cp2; PGLOBAL g = t->G; - tp = new(g) TDBMYSQL(g, this); + tp = new(g) TDBMYSQL(this); for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) { cp2 = new(g) MYSQLCOL((PMYCOL)cp1, tp); @@ -816,7 +816,7 @@ int TDBMYSQL::GetMaxSize(PGLOBAL g) /***********************************************************************/ /* This a fake routine as ROWID does not exist in MySQL. */ /***********************************************************************/ -int TDBMYSQL::RowNumber(PGLOBAL g, bool b) +int TDBMYSQL::RowNumber(PGLOBAL, bool) { return N + 1; } // end of RowNumber @@ -832,7 +832,7 @@ int TDBMYSQL::GetProgMax(PGLOBAL g) /***********************************************************************/ /* MySQL Bind Parameter function. */ /***********************************************************************/ -int TDBMYSQL::BindColumns(PGLOBAL g) +int TDBMYSQL::BindColumns(PGLOBAL g __attribute__((unused))) { #if defined(MYSQL_PREPARED_STATEMENTS) if (Prep) { @@ -1425,7 +1425,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g) /***********************************************************************/ /* WriteColumn: make sure the bind buffer is updated. */ /***********************************************************************/ -void MYSQLCOL::WriteColumn(PGLOBAL g) +void MYSQLCOL::WriteColumn(PGLOBAL) { /*********************************************************************/ /* Do convert the column value if necessary. */ @@ -1463,7 +1463,7 @@ TDBMYEXC::TDBMYEXC(PMYDEF tdp) : TDBMYSQL(tdp) Nerr = 0; } // end of TDBMYEXC constructor -TDBMYEXC::TDBMYEXC(PGLOBAL g, PTDBMYX tdbp) : TDBMYSQL(g, tdbp) +TDBMYEXC::TDBMYEXC(PTDBMYX tdbp) : TDBMYSQL(tdbp) { Cmdlist = tdbp->Cmdlist; Cmdcol = tdbp->Cmdcol; @@ -1481,7 +1481,7 @@ PTDB TDBMYEXC::CopyOne(PTABS t) PCOL cp1, cp2; PGLOBAL g = t->G; - tp = new(g) TDBMYEXC(g, this); + tp = new(g) TDBMYEXC(this); for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) { cp2 = new(g) MYXCOL((PMYXCOL)cp1, tp); @@ -1534,7 +1534,7 @@ PCMD TDBMYEXC::MakeCMD(PGLOBAL g) /***********************************************************************/ /* EXC GetMaxSize: returns the maximum number of rows in the table. */ /***********************************************************************/ -int TDBMYEXC::GetMaxSize(PGLOBAL g) +int TDBMYEXC::GetMaxSize(PGLOBAL) { if (MaxSize < 0) { MaxSize = 10; // a guess @@ -1711,7 +1711,7 @@ void MYXCOL::ReadColumn(PGLOBAL g) /***********************************************************************/ /* WriteColumn: should never be called. */ /***********************************************************************/ -void MYXCOL::WriteColumn(PGLOBAL g) +void MYXCOL::WriteColumn(PGLOBAL) { assert(false); } // end of WriteColumn diff --git a/storage/connect/tabmysql.h b/storage/connect/tabmysql.h index 99930d43a57..17d7b190340 100644 --- a/storage/connect/tabmysql.h +++ b/storage/connect/tabmysql.h @@ -73,11 +73,11 @@ class TDBMYSQL : public TDBASE { public: // Constructor TDBMYSQL(PMYDEF tdp); - TDBMYSQL(PGLOBAL g, PTDBMY tdbp); + TDBMYSQL(PTDBMY tdbp); // Implementation virtual AMT GetAmType(void) {return TYPE_AM_MYSQL;} - virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYSQL(g, this);} + virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYSQL(this);} // Methods virtual PTDB CopyOne(PTABS t); @@ -180,11 +180,11 @@ class TDBMYEXC : public TDBMYSQL { public: // Constructors TDBMYEXC(PMYDEF tdp); - TDBMYEXC(PGLOBAL g, PTDBMYX tdbp); + TDBMYEXC(PTDBMYX tdbp); // Implementation virtual AMT GetAmType(void) {return TYPE_AM_MYX;} - virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYEXC(g, this);} + virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYEXC(this);} // Methods virtual PTDB CopyOne(PTABS t); diff --git a/storage/connect/taboccur.cpp b/storage/connect/taboccur.cpp index 7f7b1c5d50c..da3cafc3c8f 100644 --- a/storage/connect/taboccur.cpp +++ b/storage/connect/taboccur.cpp @@ -266,7 +266,7 @@ bool OCCURDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB OCCURDEF::GetTable(PGLOBAL g, MODE m) +PTDB OCCURDEF::GetTable(PGLOBAL g, MODE) { if (Catfunc != FNC_COL) return new(g) TDBOCCUR(this); @@ -432,7 +432,7 @@ int TDBOCCUR::GetMaxSize(PGLOBAL g) /* In this sample, ROWID will be the (virtual) row number, */ /* while ROWNUM will be the occurence rank in the multiple column. */ /***********************************************************************/ -int TDBOCCUR::RowNumber(PGLOBAL g, bool b) +int TDBOCCUR::RowNumber(PGLOBAL, bool b) { return (b) ? M : N; } // end of RowNumber @@ -567,7 +567,7 @@ void OCCURCOL::ReadColumn(PGLOBAL g) /* ReadColumn: what this routine does is to access the Mth columns of */ /* list, extract its name and set to it the rank column value. */ /***********************************************************************/ -void RANKCOL::ReadColumn(PGLOBAL g) +void RANKCOL::ReadColumn(PGLOBAL) { PTDBOCCUR tdbp = (PTDBOCCUR)To_Tdb; PCOL *col = tdbp->Col; diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp index 401ffa3780e..b36dcbf94af 100644 --- a/storage/connect/tabpivot.cpp +++ b/storage/connect/tabpivot.cpp @@ -376,7 +376,7 @@ bool PIVOTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB PIVOTDEF::GetTable(PGLOBAL g, MODE m) +PTDB PIVOTDEF::GetTable(PGLOBAL g, MODE) { return new(g) TDBPIVOT(this); } // end of GetTable @@ -634,7 +634,7 @@ bool TDBPIVOT::MakeViewColumns(PGLOBAL g) /***********************************************************************/ /* PIVOT GetMaxSize: returns the maximum number of rows in the table. */ /***********************************************************************/ -int TDBPIVOT::GetMaxSize(PGLOBAL g) +int TDBPIVOT::GetMaxSize(PGLOBAL g __attribute__((unused))) { #if 0 if (MaxSize < 0) @@ -649,7 +649,7 @@ int TDBPIVOT::GetMaxSize(PGLOBAL g) /* In this sample, ROWID will be the (virtual) row number, */ /* while ROWNUM will be the occurence rank in the multiple column. */ /***********************************************************************/ -int TDBPIVOT::RowNumber(PGLOBAL g, bool b) +int TDBPIVOT::RowNumber(PGLOBAL, bool b) { return (b) ? M : N; } // end of RowNumber @@ -806,7 +806,7 @@ int TDBPIVOT::WriteDB(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for PIVOT access methods. */ /***********************************************************************/ -int TDBPIVOT::DeleteDB(PGLOBAL g, int irc) +int TDBPIVOT::DeleteDB(PGLOBAL g, int) { sprintf(g->Message, MSG(NO_TABLE_DEL), "PIVOT"); return RC_FX; diff --git a/storage/connect/tabsys.cpp b/storage/connect/tabsys.cpp index 3ed182c5e33..623aeca36fe 100644 --- a/storage/connect/tabsys.cpp +++ b/storage/connect/tabsys.cpp @@ -3,7 +3,7 @@ /* ------------- */ /* Version 2.3 */ /* */ -/* Author Olivier BERTRAND 2004-2014 */ +/* Author Olivier BERTRAND 2004-2015 */ /* */ /* This program are the INI/CFG tables classes. */ /***********************************************************************/ @@ -70,7 +70,7 @@ INIDEF::INIDEF(void) /***********************************************************************/ /* DefineAM: define specific AM block values from XDB file. */ /***********************************************************************/ -bool INIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool INIDEF::DefineAM(PGLOBAL g, LPCSTR, int) { char buf[8]; @@ -96,7 +96,7 @@ bool INIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB INIDEF::GetTable(PGLOBAL g, MODE m) +PTDB INIDEF::GetTable(PGLOBAL g, MODE) { PTDBASE tdbp; @@ -277,49 +277,27 @@ bool TDBINI::OpenDB(PGLOBAL g) /***********************************************************************/ /* Data Base read routine for INI access method. */ /***********************************************************************/ -int TDBINI::ReadDB(PGLOBAL g) +int TDBINI::ReadDB(PGLOBAL) { /*********************************************************************/ /* Now start the pseudo reading process. */ /*********************************************************************/ -#if 0 // INI tables are not indexable - if (To_Kindex) { - /*******************************************************************/ - /* Reading is by an index table. */ - /*******************************************************************/ - int recpos = To_Kindex->Fetch(g); - - switch (recpos) { - case -1: // End of file reached - return RC_EF; - case -2: // No match for join - return RC_NF; - case -3: // Same record as last non null one - return RC_OK; - default: - Section = (char*)recpos; // No good on 64 bit machines - } // endswitch recpos - - } else { -#endif // 0 - if (!Section) - Section = Seclist; - else - Section += (strlen(Section) + 1); - - if (trace > 1) - htrc("INI ReadDB: section=%s N=%d\n", Section, N); + if (!Section) + Section = Seclist; + else + Section += (strlen(Section) + 1); - N++; -//} // endif To_Kindex + if (trace > 1) + htrc("INI ReadDB: section=%s N=%d\n", Section, N); + N++; return (*Section) ? RC_OK : RC_EF; } // end of ReadDB /***********************************************************************/ /* WriteDB: Data Base write routine for INI access methods. */ /***********************************************************************/ -int TDBINI::WriteDB(PGLOBAL g) +int TDBINI::WriteDB(PGLOBAL) { // This is to check that section name was given when inserting if (Mode == MODE_INSERT) @@ -365,7 +343,7 @@ int TDBINI::DeleteDB(PGLOBAL g, int irc) /***********************************************************************/ /* Data Base close routine for INI access methods. */ /***********************************************************************/ -void TDBINI::CloseDB(PGLOBAL g) +void TDBINI::CloseDB(PGLOBAL) { #if !defined(WIN32) PROFILE_Close(Ifile); @@ -377,7 +355,7 @@ void TDBINI::CloseDB(PGLOBAL g) /***********************************************************************/ /* INICOL public constructor. */ /***********************************************************************/ -INICOL::INICOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) +INICOL::INICOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ) : COLBLK(cdp, tdbp, i) { if (cprec) { @@ -471,7 +449,7 @@ bool INICOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) /* from the corresponding section, extract from it the key value */ /* corresponding to this column name and convert it to buffer type. */ /***********************************************************************/ -void INICOL::ReadColumn(PGLOBAL g) +void INICOL::ReadColumn(PGLOBAL) { PTDBINI tdbp = (PTDBINI)To_Tdb; @@ -747,7 +725,7 @@ int TDBXIN::ReadDB(PGLOBAL g) /***********************************************************************/ /* WriteDB: Data Base write routine for XIN access methods. */ /***********************************************************************/ -int TDBXIN::WriteDB(PGLOBAL g) +int TDBXIN::WriteDB(PGLOBAL) { // To check that section and key names were given when inserting if (Mode == MODE_INSERT) { @@ -809,7 +787,7 @@ XINCOL::XINCOL(XINCOL *col1, PTDB tdbp) : INICOL(col1, tdbp) /* from the corresponding section, extract from it the key value */ /* corresponding to this column name and convert it to buffer type. */ /***********************************************************************/ -void XINCOL::ReadColumn(PGLOBAL g) +void XINCOL::ReadColumn(PGLOBAL) { PTDBXIN tdbp = (PTDBXIN)To_Tdb; diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp index 2bf26a5f183..f2affe75d2b 100644 --- a/storage/connect/tabtbl.cpp +++ b/storage/connect/tabtbl.cpp @@ -101,7 +101,7 @@ TBLDEF::TBLDEF(void) /**************************************************************************/ /* DefineAM: define specific AM block values from XDB file. */ /**************************************************************************/ -bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR, int) { char *tablist, *dbname, *def = NULL; @@ -161,7 +161,7 @@ bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new Table Description Block. */ /***********************************************************************/ -PTDB TBLDEF::GetTable(PGLOBAL g, MODE m) +PTDB TBLDEF::GetTable(PGLOBAL g, MODE) { if (Catfunc == FNC_COL) return new(g) TDBTBC(this); @@ -202,7 +202,7 @@ PCOL TDBTBL::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) /***********************************************************************/ /* InsertSpecialColumn: Put a special column ahead of the column list.*/ /***********************************************************************/ -PCOL TDBTBL::InsertSpecialColumn(PGLOBAL g, PCOL scp) +PCOL TDBTBL::InsertSpecialColumn(PCOL scp) { PCOL colp; @@ -548,7 +548,7 @@ int TDBTBL::ReadDB(PGLOBAL g) /***********************************************************************/ /* ReadColumn: */ /***********************************************************************/ -void TBTBLK::ReadColumn(PGLOBAL g) +void TBTBLK::ReadColumn(PGLOBAL) { if (trace) htrc("TBT ReadColumn: name=%s\n", Name); diff --git a/storage/connect/tabtbl.h b/storage/connect/tabtbl.h index 8bf440985ea..9d3f297f9e7 100644 --- a/storage/connect/tabtbl.h +++ b/storage/connect/tabtbl.h @@ -81,7 +81,7 @@ class DllExport TDBTBL : public TDBPRX { virtual int Cardinality(PGLOBAL g); virtual int GetMaxSize(PGLOBAL g); virtual int RowNumber(PGLOBAL g, bool b = FALSE); - virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL scp); + virtual PCOL InsertSpecialColumn(PCOL scp); virtual bool OpenDB(PGLOBAL g); virtual int ReadDB(PGLOBAL g); diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index c26d766af01..5ed958b2f7a 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -292,7 +292,7 @@ PRXDEF::PRXDEF(void) /***********************************************************************/ /* DefineAM: define specific AM block values from XCOL file. */ /***********************************************************************/ -bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR, int) { char *pn, *db, *tab, *def = NULL; @@ -322,7 +322,7 @@ bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB PRXDEF::GetTable(PGLOBAL g, MODE mode) +PTDB PRXDEF::GetTable(PGLOBAL g, MODE) { if (Catfunc == FNC_COL) return new(g) TDBTBC(this); @@ -341,7 +341,7 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp) Tdbp = NULL; // The object table } // end of TDBPRX constructor -TDBPRX::TDBPRX(PGLOBAL g, PTDBPRX tdbp) : TDBASE(tdbp) +TDBPRX::TDBPRX(PTDBPRX tdbp) : TDBASE(tdbp) { Tdbp = tdbp->Tdbp; } // end of TDBPRX copy constructor @@ -353,7 +353,7 @@ PTDB TDBPRX::CopyOne(PTABS t) PPRXCOL cp1, cp2; PGLOBAL g = t->G; - tp = new(g) TDBPRX(g, this); + tp = new(g) TDBPRX(this); for (cp1 = (PPRXCOL)Columns; cp1; cp1 = (PPRXCOL)cp1->GetNext()) { cp2 = new(g) PRXCOL(cp1, tp); // Make a copy diff --git a/storage/connect/tabutil.h b/storage/connect/tabutil.h index c5935d72184..b320d169b36 100644 --- a/storage/connect/tabutil.h +++ b/storage/connect/tabutil.h @@ -59,12 +59,12 @@ class DllExport TDBPRX : public TDBASE { public: // Constructors TDBPRX(PPRXDEF tdp); - TDBPRX(PGLOBAL g, PTDBPRX tdbp); + TDBPRX(PTDBPRX tdbp); // Implementation virtual AMT GetAmType(void) {return TYPE_AM_PRX;} virtual PTDB Duplicate(PGLOBAL g) - {return (PTDB)new(g) TDBPRX(g, this);} + {return (PTDB)new(g) TDBPRX(this);} // Methods virtual PTDB CopyOne(PTABS t); diff --git a/storage/connect/tabvct.cpp b/storage/connect/tabvct.cpp index 3ed40540395..6394ea5e2d6 100644 --- a/storage/connect/tabvct.cpp +++ b/storage/connect/tabvct.cpp @@ -5,7 +5,7 @@ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -94,7 +94,7 @@ PVBLK AllocValBlock(PGLOBAL, void *, int, int, int, int, /***********************************************************************/ /* DefineAM: define specific AM block values from XDB file. */ /***********************************************************************/ -bool VCTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +bool VCTDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) { DOSDEF::DefineAM(g, "BIN", poff); @@ -290,7 +290,7 @@ PCOL TDBVCT::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) /***********************************************************************/ /* VEC tables are not ready yet to use temporary files. */ /***********************************************************************/ -bool TDBVCT::IsUsingTemp(PGLOBAL g) +bool TDBVCT::IsUsingTemp(PGLOBAL) { // For developpers return (UseTemp() == TMP_TEST); @@ -570,7 +570,7 @@ void VCTCOL::ReadColumn(PGLOBAL g) /* On each change of block the buffer is written back to file and */ /* in mode Insert the buffer is filled with the block to update. */ /***********************************************************************/ -void VCTCOL::WriteColumn(PGLOBAL g) +void VCTCOL::WriteColumn(PGLOBAL) { PTXF txfp = ((PTDBVCT)To_Tdb)->Txfp;; diff --git a/storage/connect/tabvir.cpp b/storage/connect/tabvir.cpp index b4c76f5ad56..356fc981357 100644 --- a/storage/connect/tabvir.cpp +++ b/storage/connect/tabvir.cpp @@ -29,7 +29,7 @@ /***********************************************************************/ /* Return the unique column definition to MariaDB. */ /***********************************************************************/ -PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info) +PQRYRES VirColumns(PGLOBAL g, bool info) { int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT, TYPE_STRING, TYPE_STRING}; @@ -95,7 +95,7 @@ PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info) /***********************************************************************/ /* GetTable: makes a new Table Description Block. */ /***********************************************************************/ -PTDB VIRDEF::GetTable(PGLOBAL g, MODE m) +PTDB VIRDEF::GetTable(PGLOBAL g, MODE) { // Column blocks will be allocated only when needed. if (Catfunc == FNC_COL) @@ -241,7 +241,7 @@ bool TDBVIR::OpenDB(PGLOBAL g) /***********************************************************************/ /* Data Base read routine for the VIR access method. */ /***********************************************************************/ -int TDBVIR::ReadDB(PGLOBAL g) +int TDBVIR::ReadDB(PGLOBAL) { return (++N >= Size) ? RC_EF : RC_OK; } // end of ReadDB @@ -258,7 +258,7 @@ int TDBVIR::WriteDB(PGLOBAL g) /***********************************************************************/ /* Data Base delete line routine for the VIR access methods. */ /***********************************************************************/ -int TDBVIR::DeleteDB(PGLOBAL g, int irc) +int TDBVIR::DeleteDB(PGLOBAL g, int) { sprintf(g->Message, MSG(VIR_NO_DELETE), To_Def->GetType()); return RC_FX; @@ -269,7 +269,7 @@ int TDBVIR::DeleteDB(PGLOBAL g, int irc) /***********************************************************************/ /* VIRCOL public constructor. */ /***********************************************************************/ -VIRCOL::VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) +VIRCOL::VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ) : COLBLK(cdp, tdbp, i) { if (cprec) { @@ -299,7 +299,7 @@ void VIRCOL::ReadColumn(PGLOBAL g) /***********************************************************************/ PQRYRES TDBVICL::GetResult(PGLOBAL g) { - return VirColumns(g, NULL, NULL, false); + return VirColumns(g, false); } // end of GetResult /* ------------------------- End of Virtual -------------------------- */ diff --git a/storage/connect/tabvir.h b/storage/connect/tabvir.h index 8d0caa257e7..a53aceaeceb 100644 --- a/storage/connect/tabvir.h +++ b/storage/connect/tabvir.h @@ -11,7 +11,7 @@ typedef class TDBVIR *PTDBVIR; /***********************************************************************/ /* Return the unique column definition to MariaDB. */ /***********************************************************************/ -PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info); +PQRYRES VirColumns(PGLOBAL g, bool info); /* --------------------------- VIR classes --------------------------- */ diff --git a/storage/connect/tabxcl.cpp b/storage/connect/tabxcl.cpp index dffbaf6e187..7d6d94d34c0 100644 --- a/storage/connect/tabxcl.cpp +++ b/storage/connect/tabxcl.cpp @@ -83,7 +83,7 @@ bool XCLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) /***********************************************************************/ /* GetTable: makes a new TDB of the proper type. */ /***********************************************************************/ -PTDB XCLDEF::GetTable(PGLOBAL g, MODE mode) +PTDB XCLDEF::GetTable(PGLOBAL g, MODE) { if (Catfunc == FNC_COL) return new(g) TDBTBC(this); @@ -117,7 +117,7 @@ PCOL TDBXCL::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) PCOL colp; if (!stricmp(cdp->GetName(), Xcolumn)) { - Xcolp = new(g) XCLCOL(g, cdp, this, cprec, n); + Xcolp = new(g) XCLCOL(cdp, this, cprec, n); colp = Xcolp; } else colp = new(g) PRXCOL(cdp, this, cprec, n); @@ -144,7 +144,7 @@ int TDBXCL::GetMaxSize(PGLOBAL g) /* For this table type, ROWID is the (virtual) row number, */ /* while ROWNUM is be the occurence rank in the multiple column. */ /***********************************************************************/ -int TDBXCL::RowNumber(PGLOBAL g, bool b) +int TDBXCL::RowNumber(PGLOBAL, bool b) { return (b) ? M : N; } // end of RowNumber @@ -232,7 +232,7 @@ int TDBXCL::ReadDB(PGLOBAL g) /***********************************************************************/ /* XCLCOL public constructor. */ /***********************************************************************/ -XCLCOL::XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i) +XCLCOL::XCLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i) : PRXCOL(cdp, tdbp, cprec, i, "XCL") { // Set additional XXL access method information for column. diff --git a/storage/connect/tabxcl.h b/storage/connect/tabxcl.h index ed15a67b629..291f0b4263a 100644 --- a/storage/connect/tabxcl.h +++ b/storage/connect/tabxcl.h @@ -85,7 +85,7 @@ class XCLCOL : public PRXCOL { friend class TDBXCL; public: // Constructors - XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i); + XCLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i); // Methods using PRXCOL::Init; diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 4f7af638d0c..c25c3d9ffb4 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -630,7 +630,7 @@ PCOL TDBXML::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) /***********************************************************************/ /* InsertSpecialColumn: Put a special column ahead of the column list.*/ /***********************************************************************/ -PCOL TDBXML::InsertSpecialColumn(PGLOBAL g, PCOL colp) +PCOL TDBXML::InsertSpecialColumn(PCOL colp) { if (!colp->IsSpecial()) return NULL; diff --git a/storage/connect/tabxml.h b/storage/connect/tabxml.h index f6cfd3fb510..4eae5c082c1 100644 --- a/storage/connect/tabxml.h +++ b/storage/connect/tabxml.h @@ -84,7 +84,7 @@ class DllExport TDBXML : public TDBASE { // Database routines virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n); - virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp); + virtual PCOL InsertSpecialColumn(PCOL colp); //virtual int GetMaxSame(PGLOBAL g) {return (Xpand) ? Limit : 1;} virtual int Cardinality(PGLOBAL g); virtual int GetMaxSize(PGLOBAL g); diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index e731ad156d9..94e09e1a85c 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -132,7 +132,7 @@ VALBLK::VALBLK(void *mp, int type, int nval, bool un) /***********************************************************************/ /* Raise error for numeric types. */ /***********************************************************************/ -PSZ VALBLK::GetCharValue(int n) +PSZ VALBLK::GetCharValue(int) { PGLOBAL& g = Global; @@ -145,7 +145,7 @@ PSZ VALBLK::GetCharValue(int n) /***********************************************************************/ /* Set format so formatted dates can be converted on input. */ /***********************************************************************/ -bool VALBLK::SetFormat(PGLOBAL g, PSZ fmt, int len, int year) +bool VALBLK::SetFormat(PGLOBAL g, PSZ, int, int) { sprintf(g->Message, MSG(NO_DATE_FMT), Type); return true; @@ -752,7 +752,7 @@ double CHRBLK::GetFloatValue(int n) /***********************************************************************/ /* STRING GetCharString: get string representation of a char value. */ /***********************************************************************/ -char *CHRBLK::GetCharString(char *p, int n) +char *CHRBLK::GetCharString(char *, int n) { return (char *)GetValPtrEx(n); } // end of GetCharString diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h index 5a98257f98f..f6eb7258a77 100644 --- a/storage/connect/valblk.h +++ b/storage/connect/valblk.h @@ -95,17 +95,17 @@ class VALBLK : public BLOCK { virtual bool IsCi(void) {return false;} // Methods - virtual void SetValue(short sval, int n) {assert(false);} - virtual void SetValue(ushort sval, int n) {assert(false);} - virtual void SetValue(int lval, int n) {assert(false);} - virtual void SetValue(uint lval, int n) {assert(false);} - virtual void SetValue(longlong lval, int n) {assert(false);} - virtual void SetValue(ulonglong lval, int n) {assert(false);} - virtual void SetValue(double fval, int n) {assert(false);} - virtual void SetValue(char cval, int n) {assert(false);} - virtual void SetValue(uchar cval, int n) {assert(false);} - virtual void SetValue(PSZ sp, int n) {assert(false);} - virtual void SetValue(char *sp, uint len, int n) {assert(false);} + virtual void SetValue(short, int) {assert(false);} + virtual void SetValue(ushort, int) {assert(false);} + virtual void SetValue(int, int) {assert(false);} + virtual void SetValue(uint, int) {assert(false);} + virtual void SetValue(longlong, int) {assert(false);} + virtual void SetValue(ulonglong, int) {assert(false);} + virtual void SetValue(double, int) {assert(false);} + virtual void SetValue(char, int) {assert(false);} + virtual void SetValue(uchar, int) {assert(false);} + virtual void SetValue(PSZ, int) {assert(false);} + virtual void SetValue(char *, uint, int) {assert(false);} virtual void SetValue(PVAL valp, int n) = 0; virtual void SetValue(PVBLK pv, int n1, int n2) = 0; virtual void SetMin(PVAL valp, int n) = 0; @@ -271,7 +271,7 @@ class STRBLK : public VALBLK { // Implementation virtual void SetNull(int n, bool b) {if (b) {Strp[n] = NULL;}} virtual bool IsNull(int n) {return Strp[n] == NULL;} - virtual void SetNullable(bool b) {} // Always nullable + virtual void SetNullable(bool) {} // Always nullable virtual bool Init(PGLOBAL g, bool check); virtual int GetVlen(void) {return sizeof(PSZ);} virtual PSZ GetCharValue(int n) {return Strp[n];} @@ -284,7 +284,7 @@ class STRBLK : public VALBLK { virtual longlong GetBigintValue(int n); virtual ulonglong GetUBigintValue(int n); virtual double GetFloatValue(int n) {return atof(Strp[n]);} - virtual char *GetCharString(char *p, int n) {return Strp[n];} + virtual char *GetCharString(char *, int n) {return Strp[n];} virtual void Reset(int n) {Strp[n] = NULL;} // Methods diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index d14fc367cc7..5a8b1de326a 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -475,7 +475,7 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) break; case TYPE_DATE: - vp = new(g) DTVAL(g, valp->GetIntValue()); + vp = new(g) DTVAL(valp->GetIntValue()); break; case TYPE_DOUBLE: vp = new(g) TYPVAL<double>(valp->GetFloatValue(), TYPE_DOUBLE, @@ -551,7 +551,7 @@ BYTE VALUE::TestValue(PVAL vp) /***********************************************************************/ /* Compute a function on a string. */ /***********************************************************************/ -bool VALUE::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) +bool VALUE::Compute(PGLOBAL g, PVAL *, int, OPVAL) { strcpy(g->Message, "Compute not implemented for this value type"); return true; @@ -976,7 +976,7 @@ ulonglong TYPVAL<ulonglong>::MinMaxVal(bool b) {return (b) ? 0xFFFFFFFFFFFFFFFFLL : 0;} template <> -double TYPVAL<double>::MinMaxVal(bool b) +double TYPVAL<double>::MinMaxVal(bool) {assert(false); return 0.0;} template <> @@ -1566,7 +1566,7 @@ bool TYPVAL<PSZ>::GetBinValue(void *buf, int buflen, bool go) /***********************************************************************/ /* STRING ShowValue: get string representation of a char value. */ /***********************************************************************/ -char *TYPVAL<PSZ>::ShowValue(char *buf, int len) +char *TYPVAL<PSZ>::ShowValue(char *, int) { return Strp; } // end of ShowValue @@ -1574,7 +1574,7 @@ char *TYPVAL<PSZ>::ShowValue(char *buf, int len) /***********************************************************************/ /* STRING GetCharString: get string representation of a char value. */ /***********************************************************************/ -char *TYPVAL<PSZ>::GetCharString(char *p) +char *TYPVAL<PSZ>::GetCharString(char *) { return Strp; } // end of GetCharString @@ -1681,7 +1681,7 @@ bool TYPVAL<PSZ>::FormatValue(PVAL vp, char *fmt) /***********************************************************************/ /* STRING SetFormat function (used to set SELECT output format). */ /***********************************************************************/ -bool TYPVAL<PSZ>::SetConstFormat(PGLOBAL g, FORMAT& fmt) +bool TYPVAL<PSZ>::SetConstFormat(PGLOBAL, FORMAT& fmt) { fmt.Type[0] = 'C'; fmt.Length = Len; @@ -2300,7 +2300,7 @@ char *BINVAL::ShowValue(char *buf, int len) /***********************************************************************/ /* BINVAL GetCharString: get string representation of a binary value. */ /***********************************************************************/ -char *BINVAL::GetCharString(char *p) +char *BINVAL::GetCharString(char *) { if (!Chrp) Chrp = (char*)PlugSubAlloc(Global, NULL, Clen * 2 + 1); @@ -2349,7 +2349,7 @@ bool BINVAL::FormatValue(PVAL vp, char *fmt) /***********************************************************************/ /* BINVAL SetFormat function (used to set SELECT output format). */ /***********************************************************************/ -bool BINVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt) +bool BINVAL::SetConstFormat(PGLOBAL, FORMAT& fmt) { fmt.Type[0] = 'B'; fmt.Length = Clen; @@ -2379,7 +2379,7 @@ DTVAL::DTVAL(PGLOBAL g, int n, int prec, PSZ fmt) /***********************************************************************/ /* DTVAL public constructor from int. */ /***********************************************************************/ -DTVAL::DTVAL(PGLOBAL g, int n) : TYPVAL<int>(n, TYPE_DATE) +DTVAL::DTVAL(int n) : TYPVAL<int>(n, TYPE_DATE) { Pdtp = NULL; Len = 19; diff --git a/storage/connect/value.h b/storage/connect/value.h index c5aeb5c2a2f..207944594f1 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -94,18 +94,18 @@ class DllExport VALUE : public BLOCK { virtual bool SetValue_pval(PVAL valp, bool chktype = false) = 0; virtual bool SetValue_char(char *p, int n) = 0; virtual void SetValue_psz(PSZ s) = 0; - virtual void SetValue_bool(bool b) {assert(FALSE);} + virtual void SetValue_bool(bool) {assert(FALSE);} virtual int CompareValue(PVAL vp) = 0; virtual BYTE TestValue(PVAL vp); - virtual void SetValue(char c) {assert(false);} - virtual void SetValue(uchar c) {assert(false);} - virtual void SetValue(short i) {assert(false);} - virtual void SetValue(ushort i) {assert(false);} - virtual void SetValue(int n) {assert(false);} - virtual void SetValue(uint n) {assert(false);} - virtual void SetValue(longlong n) {assert(false);} - virtual void SetValue(ulonglong n) {assert(false);} - virtual void SetValue(double f) {assert(false);} + virtual void SetValue(char) {assert(false);} + virtual void SetValue(uchar) {assert(false);} + virtual void SetValue(short) {assert(false);} + virtual void SetValue(ushort) {assert(false);} + virtual void SetValue(int) {assert(false);} + virtual void SetValue(uint) {assert(false);} + virtual void SetValue(longlong) {assert(false);} + virtual void SetValue(ulonglong) {assert(false);} + virtual void SetValue(double) {assert(false);} virtual void SetValue_pvblk(PVBLK blk, int n) = 0; virtual void SetBinValue(void *p) = 0; virtual bool GetBinValue(void *buf, int buflen, bool go) = 0; @@ -338,7 +338,7 @@ class DllExport BINVAL: public VALUE { virtual void SetValue(double f); virtual void SetBinValue(void *p); virtual bool GetBinValue(void *buf, int buflen, bool go); - virtual int CompareValue(PVAL vp) {assert(false); return 0;} + virtual int CompareValue(PVAL) {assert(false); return 0;} virtual char *ShowValue(char *buf, int); virtual char *GetCharString(char *p); virtual bool IsEqual(PVAL vp, bool chktype); @@ -359,11 +359,11 @@ class DllExport DTVAL : public TYPVAL<int> { public: // Constructors DTVAL(PGLOBAL g, int n, int p, PSZ fmt); - DTVAL(PGLOBAL g, PSZ s, int n); - DTVAL(PGLOBAL g, short i); - DTVAL(PGLOBAL g, int n); - DTVAL(PGLOBAL g, longlong n); - DTVAL(PGLOBAL g, double f); +//DTVAL(PGLOBAL g, PSZ s, int n); +//DTVAL(PGLOBAL g, short i); + DTVAL(int n); +//DTVAL(PGLOBAL g, longlong n); +//DTVAL(PGLOBAL g, double f); // Implementation virtual bool IsZero(void) {return Null;} 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(); diff --git a/storage/connect/xindex.h b/storage/connect/xindex.h index 6e40e9b160e..079412b32cf 100644 --- a/storage/connect/xindex.h +++ b/storage/connect/xindex.h @@ -1,7 +1,7 @@ /*************** Xindex H Declares Source Code File (.H) ***************/ /* Name: XINDEX.H Version 3.5 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2004 - 2013 */ +/* (C) Copyright to the author Olivier BERTRAND 2004 - 2015 */ /* */ /* This file contains the XINDEX class declares. */ /***********************************************************************/ @@ -205,12 +205,11 @@ class DllExport XXBASE : public CSORT, public BLOCK { #endif // XMAP virtual int MaxRange(void) {return 1;} virtual int Fetch(PGLOBAL g) = 0; - virtual bool NextVal(bool eq) {return true;} + virtual bool NextVal(bool) {return true;} virtual bool PrevVal(void) {return true;} - virtual int FastFind(int nk) = 0; - virtual bool Reorder(PGLOBAL g) {return true;} - virtual int Range(PGLOBAL g, int limit = 0, bool incl = true) - {return -1;} // Means error + virtual int FastFind(void) = 0; + virtual bool Reorder(PGLOBAL) {return true;} + virtual int Range(PGLOBAL, int = 0, bool = true) {return -1;} // Means error virtual int Qcompare(int *, int *) = 0; virtual int GroupSize(void) {return 1;} virtual void Close(void) = 0; @@ -266,7 +265,7 @@ class DllExport XINDEX : public XXBASE { #endif // XMAP virtual int Qcompare(int *, int *); virtual int Fetch(PGLOBAL g); - virtual int FastFind(int nk); + virtual int FastFind(void); virtual int GroupSize(void); virtual int Range(PGLOBAL g, int limit = 0, bool incl = true); virtual int MaxRange(void) {return MaxSame;} @@ -280,7 +279,7 @@ class DllExport XINDEX : public XXBASE { bool GetAllSizes(PGLOBAL g,/* int &ndif,*/ int &numk); protected: - bool AddColumns(PIXDEF xdp); + bool AddColumns(void); bool NextValDif(void); // Members @@ -312,7 +311,7 @@ class DllExport XINDXS : public XINDEX { // Methods virtual int Qcompare(int *, int *); virtual int Fetch(PGLOBAL g); - virtual int FastFind(int nk); + virtual int FastFind(void); virtual bool NextVal(bool eq); virtual bool PrevVal(void); virtual int Range(PGLOBAL g, int limit = 0, bool incl = true); @@ -421,14 +420,14 @@ class DllExport XXROW : public XXBASE { // Methods virtual bool Init(PGLOBAL g); #if defined(XMAP) - virtual bool MapInit(PGLOBAL g) {return true;} + virtual bool MapInit(PGLOBAL) {return true;} #endif // XMAP virtual int Fetch(PGLOBAL g); - virtual int FastFind(int nk); + virtual int FastFind(void); virtual int MaxRange(void) {return 1;} virtual int Range(PGLOBAL g, int limit = 0, bool incl = true); virtual int Qcompare(int *, int *) {assert(false); return 0;} - virtual bool Make(PGLOBAL g, PIXDEF sxp) {return false;} + virtual bool Make(PGLOBAL, PIXDEF) {return false;} virtual void Close(void) {} protected: diff --git a/storage/connect/xobject.h b/storage/connect/xobject.h index 8e2358dd526..82ff9e21225 100644 --- a/storage/connect/xobject.h +++ b/storage/connect/xobject.h @@ -42,9 +42,9 @@ class DllExport XOBJECT : public BLOCK { virtual int GetResultType(void) {return TYPE_VOID;} virtual int GetKey(void) {return 0;} #if defined(_DEBUG) - virtual void SetKey(int k) {assert(false);} + virtual void SetKey(int) {assert(false);} #else // !_DEBUG - virtual void SetKey(int k) {} // Only defined for COLBLK + virtual void SetKey(int) {} // Only defined for COLBLK #endif // !_DEBUG virtual int GetLength(void) = 0; virtual int GetLengthEx(void) = 0; diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index d1ea2b0d85f..1a75d97bafa 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -77,21 +77,21 @@ class DllExport TDB: public BLOCK { // Table Descriptor Block. virtual int GetTdb_No(void) {return Tdb_No;} virtual PTDB GetNext(void) {return Next;} virtual PCATLG GetCat(void) {return NULL;} - virtual void SetAbort(bool b) {;} + virtual void SetAbort(bool) {;} // Methods virtual bool IsSame(PTDB tp) {return tp == this;} virtual bool IsSpecial(PSZ name) = 0; - virtual bool GetBlockValues(PGLOBAL g) {return false;} - virtual int Cardinality(PGLOBAL g) {return 0;} + virtual bool GetBlockValues(PGLOBAL) {return false;} + virtual int Cardinality(PGLOBAL) {return 0;} virtual int GetMaxSize(PGLOBAL) = 0; virtual int GetProgMax(PGLOBAL) = 0; virtual int GetProgCur(void) = 0; virtual int RowNumber(PGLOBAL g, bool b = false); virtual bool IsReadOnly(void) {return true;} virtual const CHARSET_INFO *data_charset() {return NULL;} - virtual PTDB Duplicate(PGLOBAL g) {return NULL;} - virtual PTDB CopyOne(PTABS t) {return this;} + virtual PTDB Duplicate(PGLOBAL) {return NULL;} + virtual PTDB CopyOne(PTABS) {return this;} virtual PTDB Copy(PTABS t); virtual void PrintAM(FILE *f, char *m) {fprintf(f, "%s AM(%d)\n", m, GetAmType());} @@ -108,7 +108,7 @@ class DllExport TDB: public BLOCK { // Table Descriptor Block. virtual int WriteDB(PGLOBAL) = 0; virtual int DeleteDB(PGLOBAL, int) = 0; virtual void CloseDB(PGLOBAL) = 0; - virtual int CheckWrite(PGLOBAL g) {return 0;} + virtual int CheckWrite(PGLOBAL) {return 0;} virtual bool ReadKey(PGLOBAL, OPVAL, const void *, int) = 0; protected: @@ -155,7 +155,7 @@ class DllExport TDBASE : public TDB { PCOL Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;} // Methods - virtual bool IsUsingTemp(PGLOBAL g) {return false;} + virtual bool IsUsingTemp(PGLOBAL) {return false;} virtual bool IsIndexed(void) {return false;} virtual bool IsSpecial(PSZ name); virtual PCATLG GetCat(void); @@ -170,9 +170,9 @@ class DllExport TDBASE : public TDB { virtual CHARSET_INFO *data_charset(void); virtual int GetProgMax(PGLOBAL g) {return GetMaxSize(g);} virtual int GetProgCur(void) {return GetRecpos();} - virtual PSZ GetFile(PGLOBAL g) {return "Not a file";} + virtual PSZ GetFile(PGLOBAL) {return "Not a file";} virtual int GetRemote(void) {return 0;} - virtual void SetFile(PGLOBAL g, PSZ fn) {} + virtual void SetFile(PGLOBAL, PSZ) {} virtual void ResetDB(void) {} virtual void ResetSize(void) {MaxSize = -1;} virtual void RestoreNrec(void) {} @@ -183,12 +183,12 @@ class DllExport TDBASE : public TDB { virtual PCOL ColDB(PGLOBAL g, PSZ name, int num); virtual PCOL MakeCol(PGLOBAL, PCOLDEF, PCOL, int) {assert(false); return NULL;} - virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp); + virtual PCOL InsertSpecialColumn(PCOL colp); virtual PCOL InsertSpcBlk(PGLOBAL g, PCOLDEF cdp); virtual void MarkDB(PGLOBAL g, PTDB tdb2); - virtual int MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add) + virtual int MakeIndex(PGLOBAL g, PIXDEF, bool) {strcpy(g->Message, "Remote index"); return RC_INFO;} - virtual bool ReadKey(PGLOBAL g, OPVAL op, const void *key, int len) + virtual bool ReadKey(PGLOBAL, OPVAL, const void *, int) {assert(false); return true;} protected: @@ -225,7 +225,7 @@ class DllExport TDBCAT : public TDBASE { // Methods virtual int GetRecpos(void) {return N;} virtual int GetProgCur(void) {return N;} - virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;} + virtual int RowNumber(PGLOBAL, bool = false) {return N + 1;} virtual bool SetRecpos(PGLOBAL g, int recpos); // Database routines |