On 3/12/2013 4:14 PM, Adrian Chadd wrote:
On 12 March 2013 14:12, Joshua Isom <jri...@gmail.com> wrote:
I had to remove the /sys/ from the PATH and CFLAGS to point to the right
directory, it's still failing with warnings.  I tried gcc and clang. I'll
try to see how much I can patch myself without knowing the code at all.


Hi,

Where's it failing with warnings with gcc?

I do gcc builds all the time and I get no warnings. But my primary
station/laptop testing atm is on 9-STABLE (my access points run -HEAD
atm.)

Thanks,


Adrian


Here's the build log from clang. The most obvious different things are ar9300_gpio.c's comparisons with a constant.

===> ath (all)
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. 
-I/root/ATH/head/sys/modules/ath/../../dev/ath 
-I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. 
-I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq 
-fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  
-mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs -fdiagnostics-show-option  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality  -c 
/root/ATH/head/sys/modules/ath/../../contrib/dev/
ath/ath
_hal/ar9300/ar9300_radio.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. 
-I/root/ATH/head/sys/modules/ath/../../dev/ath 
-I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. 
-I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq 
-fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  
-mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs -fdiagnostics-show-option  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality  -c 
/root/ATH/head/sys/modules/ath/../../contrib/dev/
ath/ath
_hal/ar9300/ar9300_reset.c
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c:83:27:
 error: unused variable 'ichan' [-Werror,-Wunused-variable]
    HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan);
                          ^
1 error generated.
*** [ar9300_radio.o] Error code 1
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. 
-I/root/ATH/head/sys/modules/ath/../../dev/ath 
-I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. 
-I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq 
-fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  
-mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs -fdiagnostics-show-option  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality  -c 
/root/ATH/head/sys/modules/ath/../../contrib/dev/
ath/ath
_hal/ar9300/ar9300_gpio.c
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2809:52:
 error: variable 'modes_txgaintable_index' is uninitialized when used here 
[-Werror,-Wuninitialized]
        REG_WRITE_ARRAY(&ahp->ah_ini_modes_txgain, modes_txgaintable_index,
                                                   ^~~~~~~~~~~~~~~~~~~~~~~
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:904:85:
 note: expanded from macro 'REG_WRITE_ARRAY'
                OS_REG_WRITE(ah, INI_RA((iniarray), (r), 0), INI_RA((iniarray), 
r, (column)));\
                                                                                
    ^
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:323:99:
 note: expanded from macro 'INI_RA'
#define INI_RA(iniarray, row, column) (((iniarray)->ia_array)[(row) * 
((iniarray)->ia_columns) + (column)])
                                                                                
                  ^
/root/ATH/head/sys/modules/ath/../../dev/ath/ah_osdep.h:119:68: note: expanded 
from macro 'OS_REG_WRITE'
#define OS_REG_WRITE(_ah, _reg, _val)   ath_hal_reg_write(_ah, _reg, _val)
                                                                     ^
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2609:47:
 note: initialize the variable 'modes_txgaintable_index' to silence this warning
    u_int modes_index, modes_txgaintable_index, freq_index;
                                              ^
                                               = 0
1 error generated.
*** [ar9300_reset.o] Error code 1
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:63:15:
 error: cast to 'volatile u_int32_t *' (aka 'volatile unsigned int *') from 
smaller integer type 'unsigned int' [-Werror,-Wint-to-pointer-cast]
    address = (volatile u_int32_t *)(AR9340_SOC_GPIO_FUN0 + (out_func*4));
              ^
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:159:25:
 warning: comparison of constant 20 with expression of type 'HAL_GPIO_MUX_TYPE' 
is always true [-Wtautological-constant-out-of-range-compare]
    if (hal_signal_type < ARRAY_LENGTH(mux_signal_conversion_table))
        ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:271:23:
 warning: comparison of constant 20 with expression of type 'HAL_GPIO_MUX_TYPE' 
is always true [-Wtautological-constant-out-of-range-compare]
    if (halSignalType < ARRAY_LENGTH(mux_signal_conversion_table))
        ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
*** [ar9300_gpio.o] Error code 1
3 errors
`all' not remade because of errors.
*** [all] Error code 2
1 error
*** [modules-all] Error code 2
1 error
`all' not remade because of errors.
*** [buildkernel] Error code 2
1 error
*** [buildkernel] Error code 2
1 error

_______________________________________________
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Reply via email to