X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent.cpp;h=f33518eee4eece45c2c8ce762cb22765a682209b;hb=2545db87957d24f43e2e2d5c49bb56b31bb9180a;hp=4844888a2df770ca5b9bed7e5dd7a9d758be7def;hpb=64803277bbdbe0a943360d918298a48157d9da55;p=lttng-tools.git diff --git a/src/common/event.cpp b/src/common/event.cpp index 4844888a2..f33518eee 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -20,11 +20,13 @@ #include #include +namespace { struct event_list_element { struct lttng_event *event; struct lttng_event_exclusion *exclusions; char *filter_expression; }; +} /* namespace */ static void event_list_destructor(void *ptr) { @@ -111,7 +113,9 @@ static int lttng_event_function_attr_serialize( { int ret; size_t symbol_name_len; - struct lttng_event_function_attr_comm comm = { 0 }; + struct lttng_event_function_attr_comm comm; + + comm.symbol_name_len = 0; symbol_name_len = lttng_strnlen( function->symbol_name, sizeof(function->symbol_name)); @@ -762,9 +766,9 @@ int lttng_event_serialize(const struct lttng_event *event, for (i = 0; i < exclusion_count; i++) { const size_t exclusion_len = lttng_strnlen( *(exclusion_list + i), LTTNG_SYMBOL_NAME_LEN); - const struct lttng_event_exclusion_comm exclusion_header = { - .len = (uint32_t) exclusion_len + 1, - }; + struct lttng_event_exclusion_comm exclusion_header; + + exclusion_header.len = (uint32_t) exclusion_len + 1; if (exclusion_len == LTTNG_SYMBOL_NAME_LEN) { /* Exclusion is not NULL-terminated. */ @@ -1233,7 +1237,9 @@ int lttng_event_context_serialize(struct lttng_event_context *context, struct lttng_payload *payload) { int ret; - struct lttng_event_context_comm context_comm = { 0 }; + struct lttng_event_context_comm context_comm; + + context_comm.type = 0; assert(context); assert(payload);