Skip to content

Commit

Permalink
cast, braces
Browse files Browse the repository at this point in the history
  • Loading branch information
erwee committed Mar 7, 2025
1 parent 0447691 commit c7d58d8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/mc-fle2-find-text-payload.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ DEF_TEXT_SEARCH_FIND_TOKEN_SET_PARSE(Prefix)

void mc_FLE2FindTextPayload_init(mc_FLE2FindTextPayload_t *payload) {
BSON_ASSERT_PARAM(payload);
*payload = (mc_FLE2FindTextPayload_t){{{{0}}}};
*payload = (mc_FLE2FindTextPayload_t){0};
}

void mc_FLE2FindTextPayload_cleanup(mc_FLE2FindTextPayload_t *payload) {
Expand Down Expand Up @@ -427,13 +427,13 @@ bool mc_FLE2FindTextPayload_serialize(const mc_FLE2FindTextPayload_t *payload, b
if (!BSON_APPEND_DOCUMENT_BEGIN(out, "ss", &child)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "mlen", payload->substringSpec.value.mlen)) {
if (!BSON_APPEND_INT32(&child, "mlen", (int32_t)payload->substringSpec.value.mlen)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "ub", payload->substringSpec.value.ub)) {
if (!BSON_APPEND_INT32(&child, "ub", (int32_t)payload->substringSpec.value.ub)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "lb", payload->substringSpec.value.lb)) {
if (!BSON_APPEND_INT32(&child, "lb", (int32_t)payload->substringSpec.value.lb)) {
return false;
}
if (!bson_append_document_end(out, &child)) {
Expand All @@ -447,10 +447,10 @@ bool mc_FLE2FindTextPayload_serialize(const mc_FLE2FindTextPayload_t *payload, b
if (!BSON_APPEND_DOCUMENT_BEGIN(out, "fs", &child)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "ub", payload->suffixSpec.value.ub)) {
if (!BSON_APPEND_INT32(&child, "ub", (int32_t)payload->suffixSpec.value.ub)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "lb", payload->suffixSpec.value.lb)) {
if (!BSON_APPEND_INT32(&child, "lb", (int32_t)payload->suffixSpec.value.lb)) {
return false;
}
if (!bson_append_document_end(out, &child)) {
Expand All @@ -464,10 +464,10 @@ bool mc_FLE2FindTextPayload_serialize(const mc_FLE2FindTextPayload_t *payload, b
if (!BSON_APPEND_DOCUMENT_BEGIN(out, "ps", &child)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "ub", payload->prefixSpec.value.ub)) {
if (!BSON_APPEND_INT32(&child, "ub", (int32_t)payload->prefixSpec.value.ub)) {
return false;
}
if (!BSON_APPEND_INT32(&child, "lb", payload->prefixSpec.value.lb)) {
if (!BSON_APPEND_INT32(&child, "lb", (int32_t)payload->prefixSpec.value.lb)) {
return false;
}
if (!bson_append_document_end(out, &child)) {
Expand Down

0 comments on commit c7d58d8

Please sign in to comment.