mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
- Suppress some ubuntu compiler warnings
modified: storage/connect/connect.cc storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/odbconn.cpp storage/connect/osutil.c storage/connect/tabutil.cpp
This commit is contained in:
@ -816,7 +816,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
|
||||
|
||||
p+= valp->GetClen();
|
||||
|
||||
if (len[i] == p - kp) {
|
||||
if (len[i] == (unsigned)(p - kp)) {
|
||||
n++;
|
||||
break;
|
||||
} else if (len[i] < (unsigned)(p - kp)) {
|
||||
|
@ -3433,7 +3433,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
||||
uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL);
|
||||
bool bif, ok= false, dbf= false;
|
||||
TABTYPE ttp= TAB_UNDEF;
|
||||
PQRYRES qrp;
|
||||
PQRYRES qrp= NULL;
|
||||
PCOLRES crp;
|
||||
PGLOBAL g= GetPlug(thd, NULL);
|
||||
PTOS topt= table_s->option_struct;
|
||||
@ -3709,7 +3709,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
||||
|
||||
if (fnc != FNC_NO || src || ttp == TAB_PIVOT) {
|
||||
// Catalog like table
|
||||
for (crp=qrp->Colresp; !b && crp; crp= crp->Next) {
|
||||
for (crp= qrp->Colresp; !b && crp; crp= crp->Next) {
|
||||
cnm= encode(g, crp->Name);
|
||||
type= PLGtoMYSQLtype(crp->Type, dbf);
|
||||
len= crp->Length;
|
||||
@ -3726,6 +3726,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
||||
rem= NULL;
|
||||
typ= len= dec= 0;
|
||||
tm= NOT_NULL_FLAG;
|
||||
cnm= (char*)"noname";
|
||||
|
||||
for (crp= qrp->Colresp; crp; crp= crp->Next)
|
||||
switch (crp->Fld) {
|
||||
|
@ -383,7 +383,7 @@ int MYCAT::GetCharCatInfo(PSZ what, PSZ sdef, char *buf, int size)
|
||||
/***********************************************************************/
|
||||
char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
|
||||
{
|
||||
char *sval, *s= Hc->GetStringOption(what, sdef);
|
||||
char *sval= NULL, *s= Hc->GetStringOption(what, sdef);
|
||||
|
||||
if (s) {
|
||||
sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1);
|
||||
@ -408,8 +408,7 @@ char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
|
||||
|
||||
} // endif FileType
|
||||
|
||||
} else
|
||||
sval = NULL;
|
||||
} // endif s
|
||||
|
||||
return sval;
|
||||
} // end of GetStringCatInfo
|
||||
|
@ -242,7 +242,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
|
||||
int maxres;
|
||||
PQRYRES qrp;
|
||||
CATPARM *cap;
|
||||
ODBConn *ocp;
|
||||
ODBConn *ocp = NULL;
|
||||
|
||||
/************************************************************************/
|
||||
/* Do an evaluation of the result size. */
|
||||
@ -497,7 +497,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
|
||||
int maxres;
|
||||
PQRYRES qrp;
|
||||
CATPARM *cap;
|
||||
ODBConn *ocp;
|
||||
ODBConn *ocp = NULL;
|
||||
|
||||
/************************************************************************/
|
||||
/* Do an evaluation of the result size. */
|
||||
@ -1654,7 +1654,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
|
||||
PCOLRES crp;
|
||||
RETCODE rc;
|
||||
HSTMT hstmt = NULL;
|
||||
SQLLEN *vl, *vlen;
|
||||
SQLLEN *vl, *vlen = NULL;
|
||||
PVAL *pval = NULL;
|
||||
|
||||
try {
|
||||
|
@ -181,7 +181,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength)
|
||||
} else {
|
||||
char buff[2*_MAX_PATH];
|
||||
|
||||
getcwd(buff, _MAX_PATH);
|
||||
assert(getcwd(buff, _MAX_PATH) != NULL);
|
||||
strcat(buff,"/");
|
||||
strcat(buff, relPath);
|
||||
strncpy(absPath, buff, maxLength);
|
||||
|
@ -133,7 +133,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
|
||||
int i, n, ncol = sizeof(buftyp) / sizeof(int);
|
||||
int len, type, prec;
|
||||
bool mysql;
|
||||
TABLE_SHARE *s;
|
||||
TABLE_SHARE *s = NULL;
|
||||
Field* *field;
|
||||
Field *fp;
|
||||
PQRYRES qrp;
|
||||
@ -243,7 +243,9 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
|
||||
/**********************************************************************/
|
||||
/* Return the result pointer for use by GetData routines. */
|
||||
/**********************************************************************/
|
||||
free_table_share(s);
|
||||
if (s)
|
||||
free_table_share(s);
|
||||
|
||||
return qrp;
|
||||
} // end of TabColumns
|
||||
|
||||
@ -315,12 +317,12 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp)
|
||||
/***********************************************************************/
|
||||
PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
|
||||
{
|
||||
const char *sp;
|
||||
const char *sp = NULL;
|
||||
char *db, *name;
|
||||
bool mysql = true;
|
||||
PTDB tdbp = NULL;
|
||||
TABLE_SHARE *s = NULL;
|
||||
Field* *fp;
|
||||
Field* *fp = NULL;
|
||||
PCATLG cat = To_Def->GetCat();
|
||||
PHC hc = ((MYCAT*)cat)->GetHandler();
|
||||
LPCSTR cdb, curdb = hc->GetDBName(NULL);
|
||||
|
Reference in New Issue
Block a user