Fix: may be used uninitialized on powerpc
Fix the following warning on powerpc :
In file included from ../../src/common/counter/counter-internal.h:16,
from ../../src/common/counter/counter-api.h:16,
from counter-clients/percpu-64-modular.c:12:
In function ‘__lttng_counter_add_percpu’,
inlined from ‘lttng_counter_add’ at ../../src/common/counter/counter-api.h:265:10,
inlined from ‘counter_add’ at counter-clients/percpu-64-modular.c:53:9:
include/urcu/compiler.h:25:42: warning: ‘move_sum’ may be used uninitialized [-Wmaybe-uninitialized]
25 | #define caa_unlikely(x) __builtin_expect(!!(x), 0)
| ^~~~~
../../src/common/counter/counter-api.h:244:13: note: in expansion of macro ‘caa_unlikely’
244 | if (caa_unlikely(move_sum))
| ^~~~~~~~~~~~
In file included from counter-clients/percpu-64-modular.c:12:
counter-clients/percpu-64-modular.c: In function ‘counter_add’:
../../src/common/counter/counter-api.h:237:17: note: ‘move_sum’ declared here
237 | int64_t move_sum;
| ^~~~~~~~
Change-Id: I65dc61a567c0337735124a35f1af96697d416054
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.026084 seconds and 4 git commands to generate.