summaryrefslogtreecommitdiff
path: root/storage/connect/json.cpp
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-03-19 22:55:40 +0200
committerMonty <monty@mariadb.org>2021-03-20 14:15:46 +0200
commit1e09fe3d7e91c1f9125c44852846b6a7f497d3e9 (patch)
tree1e4f1f5d9cde1103ad889f1a3cb2f57a290e75a9 /storage/connect/json.cpp
parent7bc106afd30000a6a8c082bb95cc6af3abefc486 (diff)
downloadmariadb-git-bb-10.6-monty2.tar.gz
Fix compiler warnings in connect enginebb-10.6-monty2
- 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
Diffstat (limited to 'storage/connect/json.cpp')
-rw-r--r--storage/connect/json.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp
index bd9c4fac7a1..d9fe3db7aa0 100644
--- a/storage/connect/json.cpp
+++ b/storage/connect/json.cpp
@@ -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;