Skip to content
Commit c9647a55 authored by Johan Hedberg's avatar Johan Hedberg Committed by Benjamin Cabé
Browse files

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: default avatarJohan Hedberg <johan.hedberg@silabs.com>
parent 9ba1f2e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment