[U-Boot] Please fix warnings on ARM Samsung boards
Minkyu Kang
mk7.kang at samsung.com
Tue Nov 4 02:02:32 CET 2014
Dear Masahiro YAMADA,
On 04/11/14 00:38, Masahiro YAMADA wrote:
> Hi Samsung developers,
>
>
> I see some warnings when I build Samsung boards.
>
>
> I requested this three months ago,
> but nobody would fix the warnings.
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/191762
>
>
>
>
> masahiro at oscar:~/workspace/u-boot$ arm-unknown-linux-gnueabi-gcc -v
> Using built-in specs.
> COLLECT_GCC=arm-unknown-linux-gnueabi-gcc
> COLLECT_LTO_WRAPPER=/opt/gcc-4.9.0-nolibc/arm-unknown-linux-gnueabi/bin/../libexec/gcc/arm-unknown-linux-gnueabi/4.9.0/lto-wrapper
> Target: arm-unknown-linux-gnueabi
> Configured with: /home/tony/buildall/src/gcc/configure
> --target=arm-unknown-linux-gnueabi --host=x86_64-linux-gnu
> --build=x86_64-linux-gnu --enable-targets=all
> --prefix=/opt/cross/gcc-4.9.0-nolibc/arm-unknown-linux-gnueabi/
> --enable-languages=c --with-newlib --without-headers --disable-nls
> --disable-threads --disable-shared --disable-libmudflap
> --disable-libssp --disable-libgomp --disable-decimal-float
> --enable-checking=release
> --with-mpfr=/home/tony/buildall/src/sys-x86_64
> --with-gmp=/home/tony/buildall/src/sys-x86_64 --disable-bootstrap
> --disable-libquadmath --disable-libatomic
> Thread model: single
> gcc version 4.9.0 (GCC)
> masahiro at oscar:~/workspace/u-boot$ make odroid_defconfig
> #
> # configuration written to .config
> #
> masahiro at oscar:~/workspace/u-boot$ make CROSS_COMPILE=arm-unknown-linux-gnueabi-
> [ snip ]
> LD arch/arm/cpu/armv7/s5p-common/built-in.o
> LD arch/arm/cpu/armv7/built-in.o
> AS arch/arm/cpu/armv7/start.o
> CC arch/arm/cpu/armv7/exynos/clock.o
> arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
> arch/arm/cpu/armv7/exynos/clock.c:264:47: warning: array subscript is
> above array bounds [-Warray-bounds]
> struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
> ^
> arch/arm/cpu/armv7/exynos/clock.c:264:47: warning: array subscript is
> above array bounds [-Warray-bounds]
> [ snip ]
> LD arch/arm/lib/built-in.o
> CC arch/arm/lib/eabi_compat.o
> CC board/samsung/common/gadget.o
> CC board/samsung/common/misc.o
> CC board/samsung/common/board.o
> board/samsung/common/board.c: In function 'dram_init':
> board/samsung/common/board.c:95:32: warning: iteration 4u invokes
> undefined behavior [-Waggressive-loop-optimizations]
> addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
> ^
> board/samsung/common/board.c:94:2: note: containing loop
> for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> ^
> board/samsung/common/board.c: In function 'dram_init_banksize':
> board/samsung/common/board.c:107:32: warning: iteration 4u invokes
> undefined behavior [-Waggressive-loop-optimizations]
> addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
> ^
> board/samsung/common/board.c:106:2: note: containing loop
> for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> ^
I will check soon.
Thanks,
Minkyu Kang.
More information about the U-Boot
mailing list