All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] video: sunxi: Change sunxi_get_mon_desc() to not return NULL for the default case
Date: Mon,  6 Apr 2020 05:36:03 -0700	[thread overview]
Message-ID: <1586176565-29951-2-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1586176565-29951-1-git-send-email-bmeng.cn@gmail.com>

When building with gcc 9.2.0, the following build warning was seen:

  drivers/video/sunxi/sunxi_display.c: In function 'video_hw_init':
  drivers/video/sunxi/sunxi_display.c:1217:2:
    error: '%s' directive argument is null [-Werror=format-overflow=]

Change sunxi_get_mon_desc() to not return NULL for the default case,
to fix the compiler warning.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/video/sunxi/sunxi_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
index 31f0aa7..5679d83 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -1024,7 +1024,7 @@ static const char *sunxi_get_mon_desc(enum sunxi_monitor monitor)
 	case sunxi_monitor_composite_pal_m:	return "composite-pal-m";
 	case sunxi_monitor_composite_pal_nc:	return "composite-pal-nc";
 	}
-	return NULL; /* never reached */
+	return "none"; /* never reached */
 }
 
 ulong board_get_usable_ram_top(ulong total_size)
-- 
2.7.4

  reply	other threads:[~2020-04-06 12:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 12:36 [PATCH 0/3] azure/gitlab/travis: Switch to gcc 9.2.0 Bin Meng
2020-04-06 12:36 ` Bin Meng [this message]
2020-04-06 12:41   ` [PATCH 1/3] video: sunxi: Change sunxi_get_mon_desc() to not return NULL for the default case Tom Rini
2020-04-06 12:36 ` [PATCH 2/3] buildman: Support fetching gcc 9.2.0 Bin Meng
2020-04-06 12:43   ` Tom Rini
2020-04-06 12:36 ` [PATCH 3/3] travis: Switch to " Bin Meng
2020-04-06 12:43   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586176565-29951-2-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.