fix: -Wsingle-bit-bitfield-constant-conversion with clang16
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 14 Dec 2023 15:46:56 +0000 (10:46 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Dec 2023 21:35:42 +0000 (16:35 -0500)
commit717c38f658248bc04ccfc6e7fdf5d03040c2a846
tree0e0c4633d71d74ce661307ad2ef3a5dcad84fd86
parent8bc1125eb851b2c52d3263c2992e6806017e98e7
fix: -Wsingle-bit-bitfield-constant-conversion with clang16

We get the following warning with Clang 16:

  lttng-ust-abi.c:558:38: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
         lttng_chan_buf->priv->parent.tstate = 1;

My understanding is that there is no bug because we only check if the
values are zero or not, so we can silence the warning by making the
variables unsigned.

Change-Id: Ic4e02164d5adf4271fa24e5b13e5d320ae19de2e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/events.h
This page took 0.025087 seconds and 4 git commands to generate.