aboutsummaryrefslogtreecommitdiff
path: root/lib/libdevstat
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-07-31 09:43:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-10-23 18:26:35 +0000
commit36d486cc2ecdb9c290dba65bd5668b7e50d0d822 (patch)
tree5e2ae7aa4c527ef16b971cf33d2b76adc558d25f /lib/libdevstat
parentd575077527d448ee45b923fa8c6b0cb7216ca5c5 (diff)
Fix enum warning in ath_hal's ar9002
This fixes a clang 19 warning: sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c:57:32: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_ANT_SETTING') [-Werror,-Wenum-compare] 57 | (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ The `ah_diversity` field of `struct ath_hal_5212` is of type `HAL_BOOL`, not the enum type `HAL_ANT_SETTING`. In other code, `ah_diversity` is set to `AH_TRUE` whenever the related field `ah_antControl` is set to `HAL_ANT_VARIABLE`. It is not entirely clear to me what the intended statement is here: the test as it is written now compares the enum value 0 to `ah_diversity`, so in effect it enables the following block whenever `ah_diversity` is `AH_TRUE`. Write it like that, to avoid the compiler warning. MFC after: 3 days
Diffstat (limited to 'lib/libdevstat')
0 files changed, 0 insertions, 0 deletions