Fix: v.u.d might be uninitialized
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 9 Mar 2020 23:24:07 +0000 (19:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 19 Mar 2020 13:49:31 +0000 (09:49 -0400)
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 <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I542d6db7514a2c39afe3613228577f34f194d672

liblttng-ust/lttng-filter-interpreter.c

index f246ce2a0b3383d1f000b3e17f253a77308ef6b1..7efa883f2da674ae391fd8bc0ce2adf1993376f2 100644 (file)
@@ -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;
This page took 0.0256 seconds and 4 git commands to generate.