mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
Fixed compiler warnings from connect engine
- clang complains about register in C++
- Removed not used variables
- Fixed bug when printing date in filamdbf.cpp
- Added {} to fix warning about dangling else
- Changed connect_done_func() to be global to remove conflict with header
files
- Added extra () around assignment in if
This commit is contained in:
@@ -255,11 +255,13 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
|
||||
jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL;
|
||||
} else {
|
||||
if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))
|
||||
{
|
||||
if (!mgo) {
|
||||
sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty);
|
||||
return 0;
|
||||
} else
|
||||
tdp->Lrecl = 8192; // Should be enough
|
||||
}
|
||||
|
||||
tdp->Ending = GetIntegerTableOption(g, topt, "Ending", CRLF);
|
||||
|
||||
@@ -1315,7 +1317,7 @@ bool JSONCOL::ParseJpath(PGLOBAL g)
|
||||
{
|
||||
char *p, *p1 = NULL, *p2 = NULL, *pbuf = NULL;
|
||||
int i;
|
||||
bool a, mul = false;
|
||||
bool a;
|
||||
|
||||
if (Parsed)
|
||||
return false; // Already done
|
||||
@@ -1545,7 +1547,6 @@ void JSONCOL::ReadColumn(PGLOBAL g)
|
||||
PVAL JSONCOL::GetColumnValue(PGLOBAL g, PJSON row, int i)
|
||||
{
|
||||
int n = Nod - 1;
|
||||
bool expd = false;
|
||||
PJAR arp;
|
||||
PJVAL val = NULL;
|
||||
|
||||
@@ -2106,12 +2107,14 @@ int TDBJSON::Cardinality(PGLOBAL g)
|
||||
if (!g)
|
||||
return (Xcol || Multiple) ? 0 : 1;
|
||||
else if (Cardinal < 0)
|
||||
{
|
||||
if (!Multiple) {
|
||||
if (MakeDocument(g) == RC_OK)
|
||||
Cardinal = Doc->size();
|
||||
|
||||
} else
|
||||
return 10;
|
||||
}
|
||||
|
||||
return Cardinal;
|
||||
} // end of Cardinality
|
||||
|
||||
Reference in New Issue
Block a user