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)
case TYPE_DBL:
sprintf(buf, "%.*lf", jvp->Nd, *(double*)MakePtr(Base, jvp->To_Val));
return jp->WriteStr(buf);
case TYPE_NULL:
case (char)TYPE_NULL:
return jp->WriteStr("null");
case TYPE_JVAL:
return SerializeValue(MVP(jvp->To_Val));
......@@ -1557,7 +1557,7 @@ PSZ BJSON::GetString(PBVAL vp, char* buff)
case TYPE_BOOL:
p = (PSZ)((vlp->B) ? "true" : "false");
break;
case TYPE_NULL:
case (char)TYPE_NULL:
p = (PSZ)"null";
break;
default:
......@@ -1772,7 +1772,7 @@ bool BJSON::IsValueNull(PBVAL vlp)
bool b;
switch (vlp->Type) {
case TYPE_NULL:
case (char)TYPE_NULL:
b = true;
break;
case TYPE_JOB:
......
......@@ -491,7 +491,7 @@ void BJNX::SetJsonValue(PGLOBAL g, PVAL vp, PBVAL vlp)
case TYPE_JOB:
vp->SetValue_psz(GetObjectText(g, vlp, NULL));
break;
case TYPE_NULL:
case (char)TYPE_NULL:
vp->SetNull(true);
default:
vp->Reset();
......@@ -1320,7 +1320,7 @@ my_bool BJNX::CompareValues(PGLOBAL g, PBVAL v1, PBVAL v2)
b = (v1->B == v2->B);
break;
case TYPE_NULL:
case (char)TYPE_NULL:
b = (v2->Type == TYPE_NULL);
break;
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