From 0245c698528954caad460f2e6728e4a593d8951e Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 9 Mar 2020 19:24:07 -0400 Subject: [PATCH] Fix: v.u.d might be uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- liblttng-ust/lttng-filter-interpreter.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.34.1