diff mbox series

[U-Boot] arm: bootm-fdt.c: fix compiler warning

Message ID 20180117060050.21068-1-hs@denx.de
State Accepted
Commit 020da843fc97d0945ad39b3f08a925cfc016fef3
Delegated to: Tom Rini
Headers show
Series [U-Boot] arm: bootm-fdt.c: fix compiler warning | expand

Commit Message

Heiko Schocher Jan. 17, 2018, 6 a.m. UTC
compiling U-Boot with bosch_mpcxxxxd_sd_defconfig
drops warning:

arch/arm/lib/bootm-fdt.c: In function ‘arch_fixup_fdt’:
arch/arm/lib/bootm-fdt.c:37:6: warning: unused variable ‘ret’ [-Wunused-variable]
  int ret = 0;
      ^~~

Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 arch/arm/lib/bootm-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Jan. 28, 2018, 6:52 p.m. UTC | #1
On Wed, Jan 17, 2018 at 07:00:37AM +0100, Heiko Schocher wrote:

> compiling U-Boot with bosch_mpcxxxxd_sd_defconfig
> drops warning:
> 
> arch/arm/lib/bootm-fdt.c: In function ‘arch_fixup_fdt’:
> arch/arm/lib/bootm-fdt.c:37:6: warning: unused variable ‘ret’ [-Wunused-variable]
>   int ret = 0;
>       ^~~
> 
> Fix it.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index fcc2a0e214..83409a7ece 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -34,7 +34,7 @@  __weak int fdt_update_ethernet_dt(void *blob)
 
 int arch_fixup_fdt(void *blob)
 {
-	int ret = 0;
+	__maybe_unused int ret = 0;
 #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_OF_LIBFDT)
 	bd_t *bd = gd->bd;
 	int bank;