jsonbuilder: fix build error

Clang's build in travis-ci is actually failing because of this error:

output-json-alert.c:476:40: error: missing field 'state_index' initializer

      [-Werror,-Wmissing-field-initializers]

            JsonBuilderMark mark = { 0 };
pull/5021/head
Giuseppe Longo 5 years ago
parent a77662bdbf
commit cb7e72e602

@ -473,7 +473,7 @@ static int AlertJson(ThreadVars *tv, JsonAlertLogThread *aft, const Packet *p)
if (json_output_ctx->flags & LOG_JSON_APP_LAYER && p->flow != NULL) {
const AppProto proto = FlowGetAppProtocol(p->flow);
JsonBuilderMark mark = { 0 };
JsonBuilderMark mark = { 0, 0, 0 };
switch (proto) {
case ALPROTO_HTTP:
// TODO: Could result in an empty http object being logged.

@ -179,7 +179,7 @@ static int JsonEmailAddToJsonArray(const uint8_t *val, size_t len, void *data)
static void EveEmailLogJSONCustom(OutputJsonEmailCtx *email_ctx, JsonBuilder *js, SMTPTransaction *tx)
{
int f = 0;
JsonBuilderMark mark = { 0 };
JsonBuilderMark mark = { 0, 0, 0 };
MimeDecField *field;
MimeDecEntity *entity = tx->msg_tail;
if (entity == NULL) {
@ -234,7 +234,7 @@ static bool EveEmailLogJsonData(const Flow *f, void *state, void *vtx, uint64_t
SMTPState *smtp_state;
MimeDecParseState *mime_state;
MimeDecEntity *entity;
JsonBuilderMark mark = { 0 };
JsonBuilderMark mark = { 0, 0, 0 };
/* check if we have SMTP state or not */
AppProto proto = FlowGetAppProtocol(f);
@ -365,7 +365,7 @@ TmEcode EveEmailLogJson(JsonEmailLogThread *aft, JsonBuilder *js, const Packet *
{
OutputJsonEmailCtx *email_ctx = aft->emaillog_ctx;
SMTPTransaction *tx = (SMTPTransaction *) vtx;
JsonBuilderMark mark = { 0 };
JsonBuilderMark mark = { 0, 0, 0 };
jb_get_mark(js, &mark);
jb_open_object(js, "email");

@ -122,7 +122,7 @@ JsonBuilder *JsonBuildFileInfoRecord(const Packet *p, const File *ff,
if (unlikely(js == NULL))
return NULL;
JsonBuilderMark mark = { 0 };
JsonBuilderMark mark = { 0, 0, 0 };
switch (p->flow->alproto) {
case ALPROTO_HTTP:
jb_open_object(js, "http");

Loading…
Cancel
Save