From c8b71a35289112f77691df0d0b4a97ef19dac87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Majewski?= Date: Wed, 4 Mar 2015 10:54:48 +0100 Subject: samsung: board: fix: Define loop iterator as an unsigned int to suppress gcc 4.8 warning This patch suppress following warning: 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 about possible signed integer overflow at gcc 4.8.2 (odroid board) Signed-off-by: Lukasz Majewski Signed-off-by: Minkyu Kang --- board/samsung/common/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 6c7f59be87..97950fa192 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -88,7 +88,7 @@ int board_init(void) int dram_init(void) { - int i; + unsigned int i; u32 addr; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { @@ -100,7 +100,7 @@ int dram_init(void) void dram_init_banksize(void) { - int i; + unsigned int i; u32 addr, size; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { -- cgit v1.2.1