diff mbox series

[U-Boot] splash: fix build breakage with newer llvm-7

Message ID 20191030140410.4066-1-agust@denx.de
State Accepted
Commit 2ad8494c0fd7279aa9a7f73aff3fc38895e77711
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot] splash: fix build breakage with newer llvm-7 | expand

Commit Message

Anatolij Gustschin Oct. 30, 2019, 2:04 p.m. UTC
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")
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reported-by: Tom Rini <trini@konsulko.com>
---
 common/splash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini Oct. 30, 2019, 5:04 p.m. UTC | #1
On Wed, Oct 30, 2019 at 03:04:10PM +0100, Anatolij Gustschin wrote:

> 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")
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Reported-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/common/splash.c b/common/splash.c
index 0bcedbb0ba..e7d847726d 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -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;
 }