mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
@ 2015-01-13  5:47 Jean-Christophe PLAGNIOL-VILLARD
  2015-01-13  5:47 ` [PATCH 2/2] command/splash: fix return value Jean-Christophe PLAGNIOL-VILLARD
  2015-01-13  7:47 ` [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2015-01-13  5:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 scripts/kconfig/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index a26cc5d..584e0fc 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
 {
 	int i, j;
 	struct menu *submenu[8], *menu, *location = NULL;
-	struct jump_key *jump;
+	struct jump_key *jump = NULL;
 
 	str_printf(r, _("Prompt: %s\n"), _(prop->text));
 	menu = prop->menu->parent;
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] command/splash: fix return value
  2015-01-13  5:47 [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Jean-Christophe PLAGNIOL-VILLARD
@ 2015-01-13  5:47 ` Jean-Christophe PLAGNIOL-VILLARD
  2015-01-13  7:47 ` [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2015-01-13  5:47 UTC (permalink / raw)
  To: barebox

return errno when possible

otherwise return 0 for ok or 1 for error

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 commands/splash.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/commands/splash.c b/commands/splash.c
index 2ce1bdd..9bd84fb 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -11,7 +11,8 @@ static int do_splash(int argc, char *argv[])
 {
 	struct surface s;
 	struct screen sc;
-	int ret, opt, fd;
+	int ret = 0;
+	int opt, fd;
 	char *fbdev = "/dev/fb0";
 	char *image_file;
 	int offscreen = 0;
@@ -54,7 +55,7 @@ static int do_splash(int argc, char *argv[])
 	fd = fb_open(fbdev, &sc, offscreen);
 	if (fd < 0) {
 		perror("fd_open");
-		return 1;
+		return fd;
 	}
 
 	if (sc.offscreenbuf) {
@@ -67,8 +68,9 @@ static int do_splash(int argc, char *argv[])
 		memset_pixel(&sc.info, sc.fb, bg_color, sc.s.width * sc.s.height);
 	}
 
-	if (image_renderer_file(&sc, &s, image_file) < 0)
-		ret = 1;
+	ret = image_renderer_file(&sc, &s, image_file);
+	if (ret > 0)
+		ret = 0;
 
 	screen_blit(&sc);
 
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  2015-01-13  5:47 [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Jean-Christophe PLAGNIOL-VILLARD
  2015-01-13  5:47 ` [PATCH 2/2] command/splash: fix return value Jean-Christophe PLAGNIOL-VILLARD
@ 2015-01-13  7:47 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-01-13  7:47 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Tue, Jan 13, 2015 at 06:47:30AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  scripts/kconfig/menu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-13  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13  5:47 [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Jean-Christophe PLAGNIOL-VILLARD
2015-01-13  5:47 ` [PATCH 2/2] command/splash: fix return value Jean-Christophe PLAGNIOL-VILLARD
2015-01-13  7:47 ` [PATCH 1/2] kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized] Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox