With gcc 7.3.0 a warning is given about two variables possibly being
uninitialized in compose_sample_action(). The code path only allows the
variables to be used if they've been initialized, so this warning is
incorrect. However, this change allows a clean build.
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Flavio Leitner <fbl@sysclose.org>
/* When meter action is not required, avoid generate sample action
* for 100% sampling rate. */
bool is_sample = probability < UINT32_MAX || meter_id != UINT32_MAX;
- size_t sample_offset, actions_offset;
+ size_t sample_offset = 0, actions_offset = 0;
if (is_sample) {
sample_offset = nl_msg_start_nested(ctx->odp_actions,
OVS_ACTION_ATTR_SAMPLE);