Skip to contentSkip to conversation

splash: fix build breakage with newer llvm-7

PATCH New Anatolij Gustschin 2 participants 2 messages Oct 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 splash: fix build breakage with newer llvm-7

Some configurations (i.e. sandbox) result in unused splash_display_banner() and we get build errors like:

common/splash.c:148:20: error: unused function 'splash_display_banner' [-Werror,-Wunused-function] static inline void splash_display_banner(void) { }

Drop empty inline function and add guards around the call.

Fixes d2a8271c8851 ("splash: fix splash banner output")
---
 common/splash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/splash.c +2 -2
index 0bcedbb0ba..e7d847726d 100644
@@ -144,8 +144,6 @@ void splash_display_banner(void)
 	vidconsole_put_string(dev, buf);
 	vidconsole_position_cursor(dev, 0, row);
 }
-#else
-static inline void splash_display_banner(void) { }
 #endif /* CONFIG_DM_VIDEO && !CONFIG_HIDE_LOGO_VERSION */
 
 /*
@@ -177,7 +175,9 @@ int splash_display(void)
 	if (x || y)
 		goto end;
 
+#if defined(CONFIG_DM_VIDEO) && !defined(CONFIG_HIDE_LOGO_VERSION)
 	splash_display_banner();
+#endif
 end:
 	return ret;
 }
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 splash: fix build breakage with newer llvm-7

Quoted 11 lines · Anatolij Gustschin

Some configurations (i.e. sandbox) result in unused splash_display_banner() and we get build errors like:

common/splash.c:148:20: error: unused function 'splash_display_banner' [-Werror,-Wunused-function] static inline void splash_display_banner(void) { }

Drop empty inline function and add guards around the call.

Fixes d2a8271c8851 ("splash: fix splash banner output")
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191030/b1ad933f/attachment.sig>