You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bluetooth: Classic: Fix invalid comparison with int8_t
We can't use 0xff to compare with an int8_t since it'll trigger compiler
warnings/errors:
subsys/bluetooth/host/classic/br.c:397:11: error: result of comparison of
constant 255 with expression of type 'int8_t' (aka 'signed char') is
always false [-Werror,-Wtautological-constant-out-of-range-compare]
if (rssi == 0xff) {
~~ ^ ~~
1 error generated.
Use 127 instead for situations where we don't know the RSSI value, like
when processing remote name events. This is fine since from a spec
perspective only -127 - +20 are valid values for the parameter.
Signed-off-by: Johan Hedberg <[email protected]>
0 commit comments