From: Jonathan Rajotte Date: Mon, 9 Mar 2020 23:24:07 +0000 (-0400) Subject: Fix: v.u.d might be uninitialized X-Git-Tag: v2.12.0-rc3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=628f0e45bd8bed9186406cf68a6866ef5f55e60c;p=lttng-ust.git Fix: v.u.d might be uninitialized lttng-filter-interpreter.c:301:17: warning: ‘v.u.d’ may be used uninitialized in this function [-Wmaybe-uninitialized] ptr->u.d = v.u.d; Indeed it seems that the value is never fetched if we compare to other call sites and the dynamic call site further below. Signed-off-by: Jonathan Rajotte Signed-off-by: Mathieu Desnoyers Change-Id: I542d6db7514a2c39afe3613228577f34f194d672 --- diff --git a/liblttng-ust/lttng-filter-interpreter.c b/liblttng-ust/lttng-filter-interpreter.c index 59bc72cd..b57edacd 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -297,6 +297,7 @@ static int context_get_index(struct lttng_ctx *ctx, break; case atype_float: ptr->object_type = OBJECT_TYPE_DOUBLE; + ctx_field->get_value(ctx_field, &v); ptr->u.d = v.u.d; ptr->ptr = &ptr->u.d; break;