The return value of lttng_dynamic_buffer_set_size() is ignored in
lttng_dynamic_array_clear(). It is okay as
lttng_dynamic_buffer_set_size(..., 0) can't fail. However, it
results in a Coverity Scan warning.
1412201 Unchecked return value
If the function returns an error value, the error value may be
mistaken for a normal value.
In lttng_dynamic_array_clear: Value returned from a function is not
checked for errors before being used (CWE-252)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1943e299e4cb5752711f2d25b0dd9a5c44a28a18
}
}
- lttng_dynamic_buffer_set_size(&array->buffer, 0);
+ (void) lttng_dynamic_buffer_set_size(&array->buffer, 0);
array->size = 0;
}