mirror of
https://github.com/opnsense/src.git
synced 2026-02-22 09:21:31 -05:00
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
(cherry picked from commit 36d486cc2ecdb9c290dba65bd5668b7e50d0d822)
|
||
|---|---|---|
| .. | ||
| ah_regdomain | ||
| ar5210 | ||
| ar5211 | ||
| ar5212 | ||
| ar5312 | ||
| ar5416 | ||
| ar9001 | ||
| ar9002 | ||
| ar9003 | ||
| ah.c | ||
| ah.h | ||
| ah_btcoex.h | ||
| ah_debug.h | ||
| ah_decode.h | ||
| ah_desc.h | ||
| ah_devid.h | ||
| ah_diagcodes.h | ||
| ah_eeprom.h | ||
| ah_eeprom_9287.c | ||
| ah_eeprom_9287.h | ||
| ah_eeprom_v1.c | ||
| ah_eeprom_v1.h | ||
| ah_eeprom_v3.c | ||
| ah_eeprom_v3.h | ||
| ah_eeprom_v4k.c | ||
| ah_eeprom_v4k.h | ||
| ah_eeprom_v14.c | ||
| ah_eeprom_v14.h | ||
| ah_internal.h | ||
| ah_regdomain.c | ||
| ah_regdomain.h | ||
| ah_soc.h | ||