I'm busy with importing a new clang snapshot into head. This version has a bunch of interesting new warnings, and I got the following one during building of ath: sys/dev/ath/ath_hal/ah_eeprom_9287.c:307:6: error: variable 'magic' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (ah->ah_eepromdata == NULL) { ^~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/ath/ath_hal/ah_eeprom_9287.c:316:6: note: uninitialized use occurs here if (magic != AR5416_EEPROM_MAGIC) { ^~~~~ sys/dev/ath/ath_hal/ah_eeprom_9287.c:307:2: note: remove the 'if' if its condition is always true if (ah->ah_eepromdata == NULL) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/ath/ath_hal/ah_eeprom_9287.c:295:27: note: initialize the variable 'magic' to silence this warning uint16_t *eep_data, magic; ^ = 0 It's because if ah->ah_eepromdata is non-null, magic just contains garbage, and is then still checked against AR5416_EEPROM_MAGIC. If the comment above ("Don't check magic if we're supplied with an EEPROM block") applies, then I suggest to move the checking block inside the previous if, as in the attached patch. Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-bugs->freebsd-wireless Over to maintainer(s).
Fixed in r239704.