From 67e8e7255dc8ba8bed899de7e03735a8ebabb301 Mon Sep 17 00:00:00 2001 From: coypu Date: Fri, 16 Sep 2016 15:18:39 +0300 Subject: [PATCH 10/27] hack for undefined behaviour --- sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c b/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c index 12cb67e..e224b36 100644 --- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c +++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c @@ -229,7 +229,16 @@ fbin2freq(uint8_t fbin, HAL_BOOL is2GHz) /* USE CTLS from chain zero */ #define CTL_CHAIN 0 -static void +/* XXX UB +/usr/src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:243:53: error: iteration 4u invokes undefined behavior [-Werror=aggressive-loop-optimizations] + if (ee->ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) { + ^ +/usr/src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c:241:3: note: containing loop + for (j = 0; j < NUM_EDGES; j ++) { + ^ +cc1: all warnings being treated as errors + */ +static void __attribute__((optimize("O0"))) v4kEepromReadCTLInfo(struct ath_hal *ah, HAL_EEPROM_v4k *ee) { RD_EDGES_POWER *rep = ee->ee_rdEdgesPower; -- 2.9.3