Skip to content
Snippets Groups Projects
Commit c8b71a35 authored by Łukasz Majewski's avatar Łukasz Majewski Committed by Minkyu Kang
Browse files

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: default avatarLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
parent 19e5118d
No related branches found
No related tags found
No related merge requests found
......@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment