Coverity complains that struct lttng_evaluation_comm's payload
field is not initialized. "payload" is a flexible array
member which should be ignored. Normally, a such a member
_could_ result in additional padding added at the end of the
structure. In this case, the structure is declared as packed.
Nonetheless, using a designated initializer gets rid of the
ambiguity and silences Coverity.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
char *buf)
{
ssize_t ret, offset = 0;
- struct lttng_evaluation_comm evaluation_comm;
+ struct lttng_evaluation_comm evaluation_comm = {
+ .type = (int8_t) evaluation->type
+ };
- evaluation_comm.type = (int8_t) evaluation->type;
if (buf) {
memcpy(buf, &evaluation_comm, sizeof(evaluation_comm));
}