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

Fix compiler warnings in connect engine

- Removed not used variables
- Added /* fall through */ to switches
- Removed not used static variable 'slash' from header file
- Removed test of fp->field_length >= 0 as it is always true
This commit is contained in:
Monty
2021-03-19 22:55:40 +02:00
parent 93bb755dc8
commit c22e6eeda8
10 changed files with 39 additions and 35 deletions

View File

@@ -1001,7 +1001,7 @@ int JOBJECT::GetSize(bool b) {
for (PJPR jpp = First; jpp; jpp = jpp->Next)
// If b return only non null pairs
if (!b || jpp->Val && !jpp->Val->IsNull())
if (!b || (jpp->Val && !jpp->Val->IsNull()))
n++;
return n;
@@ -1530,10 +1530,12 @@ PVAL JVALUE::GetValue(PGLOBAL g)
PVAL valp = NULL;
if (DataType != TYPE_JSON)
{
if (DataType == TYPE_STRG)
valp = AllocateValue(g, Strp, DataType, Nd);
else
valp = AllocateValue(g, &LLn, DataType, Nd);
}
return valp;
} // end of GetValue
@@ -1704,6 +1706,7 @@ void JVALUE::SetValue(PGLOBAL g, PVAL valp)
case TYPE_TINY:
B = valp->GetTinyValue() != 0;
DataType = TYPE_BOOL;
break;
case TYPE_INT:
N = valp->GetIntValue();
DataType = TYPE_INTG;