Message ID | 1473035561-23420-5-git-send-email-andre.przywara@arm.com |
---|---|
State | Accepted |
Commit | 5a74a3912970d4fa5625237f0117ca08c2878f29 |
Delegated to: | Hans de Goede |
Headers | show |
On Mon, 5 Sep 2016 01:32:41 +0100 Andre Przywara <andre.przywara@arm.com> wrote: > Casting "int"s to pointers is only valid for 32-bit systems. > Add the appropriate pointer type cast to avoid a compiler warning > when compiling for AArch64. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > board/sunxi/board.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/board/sunxi/board.c b/board/sunxi/board.c > index 209fb1c..6281c9d 100644 > --- a/board/sunxi/board.c > +++ b/board/sunxi/board.c > @@ -602,7 +602,7 @@ static void parse_spl_header(const uint32_t spl_addr) > * data is expected in uEnv.txt compatible format, so "env > * import -t" the string(s) at fel_script_address right away. > */ > - himport_r(&env_htab, (char *)spl->fel_script_address, > + himport_r(&env_htab, (char *)(uintptr_t)spl->fel_script_address, > spl->fel_uEnv_length, '\n', H_NOCLEAR, 0, 0, NULL); > return; > } Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 209fb1c..6281c9d 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -602,7 +602,7 @@ static void parse_spl_header(const uint32_t spl_addr) * data is expected in uEnv.txt compatible format, so "env * import -t" the string(s) at fel_script_address right away. */ - himport_r(&env_htab, (char *)spl->fel_script_address, + himport_r(&env_htab, (char *)(uintptr_t)spl->fel_script_address, spl->fel_uEnv_length, '\n', H_NOCLEAR, 0, 0, NULL); return; }
Casting "int"s to pointers is only valid for 32-bit systems. Add the appropriate pointer type cast to avoid a compiler warning when compiling for AArch64. Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- board/sunxi/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)