Skip to contentSkip to conversation

arm: bootm-fdt.c: fix compiler warning

PATCH In review Heiko Schocher 2 participants 2 messages Jan 17, 2018 – Jan 28, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: bootm-fdt.c: fix compiler warning

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.

---

 arch/arm/lib/bootm-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/bootm-fdt.c +1 -1
index fcc2a0e214..83409a7ece 100644
@@ -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;
Signature · 1 line
2.14.3
#1 lore raw
Quoted 11 lines · Heiko Schocher

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/f46cd22b/attachment.sig>