Fix: may be used uninitialized on powerpc
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 18 Jan 2022 19:14:33 +0000 (19:14 +0000)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 24 Jan 2022 20:26:59 +0000 (15:26 -0500)
commit08c1dfc43e014a99cd47202f6b370f8afa33e4c8
tree43ebc0cd4854def05206b0d40d6ee34617bc0677
parent6ae20f706f09cf8dba1fbad4a672ff7226c8d68a
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>
src/common/counter/counter-api.h
This page took 0.026084 seconds and 4 git commands to generate.