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:50:19 +0000 (09:50 -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 59bc72cdf442027e8e78ba535c91a9e13bd7502f..b57edacde71f4cc5d2f67f8fe4ccde224a777727 100644 (file)
@@ -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;
This page took 0.02747 seconds and 4 git commands to generate.