Hi Nortbert,

thanks for the bug report. A change has been merged which addresses this warning: https://github.com/lttng/lttng-tools/commit/734b1cd20cb8390f9b0f6de9def9d5bccb621197

thanks,
kienan

On 6/17/25 7:00 AM, Norbert Lange via lttng-dev wrote:
Hello,

enum communication_state exists twice with already diverging definitions.
I am not sure if its a functional issue now, but this sound like it
can cause fun bughunts in the future.

(enabling lto helps finding that kinda stuff)

../../../../src/lib/lttng-ctl/clear.cpp:26:6: warning: type
'communication_state' violates the C++ One Definition Rule [-Wodr]
    26 | enum communication_state {
       |      ^
../../../../src/lib/lttng-ctl/destruction-handle.cpp:25:6: note: an
enum with different value name is defined in another translation unit
    25 | enum communication_state {
       |      ^
../../../../src/lib/lttng-ctl/clear.cpp:29:2: note: name
'COMMUNICATION_STATE_END' differs from name
'COMMUNICATION_STATE_RECEIVE_PAYLOAD' defined in another translation
unit
    29 |  COMMUNICATION_STATE_END,
       |  ^
../../../../src/lib/lttng-ctl/destruction-handle.cpp:28:2: note:
mismatching definition
    28 |  COMMUNICATION_STATE_RECEIVE_PAYLOAD,
       |  ^

Regards, Norbert

Reply via email to