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.13.0-rc1~525 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=0245c698528954caad460f2e6728e4a593d8951e;ds=sidebyside 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 f246ce2a..7efa883f 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -298,6 +298,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;