diff options
author | Monty <monty@mariadb.org> | 2021-09-15 19:16:37 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2021-09-15 19:16:37 +0300 |
commit | 6be0ddae5edb080219226525c4423300f063081d (patch) | |
tree | 0b9d2ef4179dc867c43f95150a2e2e5570f2c0f8 | |
parent | 07abcb5045f9914d023ca630f7a35f4fcbf18a6c (diff) | |
download | mariadb-git-6be0ddae5edb080219226525c4423300f063081d.tar.gz |
Fixed compiler warnings in CONNECT
-rw-r--r-- | storage/connect/json.cpp | 5 | ||||
-rw-r--r-- | storage/connect/tabrest.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index b9f9492320b..17c6ba9791a 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -1051,7 +1051,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; @@ -1581,10 +1581,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 @@ -1755,6 +1757,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; diff --git a/storage/connect/tabrest.h b/storage/connect/tabrest.h index 9066a89b306..901d9102e95 100644 --- a/storage/connect/tabrest.h +++ b/storage/connect/tabrest.h @@ -6,9 +6,7 @@ #pragma once #if defined(_WIN32) -static PCSZ slash = "\\"; #else // !_WIN32 -static PCSZ slash = "/"; #define stricmp strcasecmp #endif // !_WIN32 |