Commit 496f7090 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Fix of warnings on aarch64 like:

bson.cpp:1775:3: error: case label value is less than minimum value for type [-Werror]
   case TYPE_NULL:
bson.cpp:1776:7: error: statement will never be executed [-Werror=switch-unreachable]
     b = true;
parent 40868c47
...@@ -767,7 +767,7 @@ bool BDOC::SerializeValue(PBVAL jvp, bool b) ...@@ -767,7 +767,7 @@ bool BDOC::SerializeValue(PBVAL jvp, bool b)
case TYPE_DBL: case TYPE_DBL:
sprintf(buf, "%.*lf", jvp->Nd, *(double*)MakePtr(Base, jvp->To_Val)); sprintf(buf, "%.*lf", jvp->Nd, *(double*)MakePtr(Base, jvp->To_Val));
return jp->WriteStr(buf); return jp->WriteStr(buf);
case TYPE_NULL: case (char)TYPE_NULL:
return jp->WriteStr("null"); return jp->WriteStr("null");
case TYPE_JVAL: case TYPE_JVAL:
return SerializeValue(MVP(jvp->To_Val)); return SerializeValue(MVP(jvp->To_Val));
...@@ -1557,7 +1557,7 @@ PSZ BJSON::GetString(PBVAL vp, char* buff) ...@@ -1557,7 +1557,7 @@ PSZ BJSON::GetString(PBVAL vp, char* buff)
case TYPE_BOOL: case TYPE_BOOL:
p = (PSZ)((vlp->B) ? "true" : "false"); p = (PSZ)((vlp->B) ? "true" : "false");
break; break;
case TYPE_NULL: case (char)TYPE_NULL:
p = (PSZ)"null"; p = (PSZ)"null";
break; break;
default: default:
...@@ -1772,7 +1772,7 @@ bool BJSON::IsValueNull(PBVAL vlp) ...@@ -1772,7 +1772,7 @@ bool BJSON::IsValueNull(PBVAL vlp)
bool b; bool b;
switch (vlp->Type) { switch (vlp->Type) {
case TYPE_NULL: case (char)TYPE_NULL:
b = true; b = true;
break; break;
case TYPE_JOB: case TYPE_JOB:
......
...@@ -491,7 +491,7 @@ void BJNX::SetJsonValue(PGLOBAL g, PVAL vp, PBVAL vlp) ...@@ -491,7 +491,7 @@ void BJNX::SetJsonValue(PGLOBAL g, PVAL vp, PBVAL vlp)
case TYPE_JOB: case TYPE_JOB:
vp->SetValue_psz(GetObjectText(g, vlp, NULL)); vp->SetValue_psz(GetObjectText(g, vlp, NULL));
break; break;
case TYPE_NULL: case (char)TYPE_NULL:
vp->SetNull(true); vp->SetNull(true);
default: default:
vp->Reset(); vp->Reset();
...@@ -1320,7 +1320,7 @@ my_bool BJNX::CompareValues(PGLOBAL g, PBVAL v1, PBVAL v2) ...@@ -1320,7 +1320,7 @@ my_bool BJNX::CompareValues(PGLOBAL g, PBVAL v1, PBVAL v2)
b = (v1->B == v2->B); b = (v1->B == v2->B);
break; break;
case TYPE_NULL: case (char)TYPE_NULL:
b = (v2->Type == TYPE_NULL); b = (v2->Type == TYPE_NULL);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment