From: Fabio Porcedda <fabio.porcedda@gmail.com>
To: barebox@lists.infradead.org
Cc: Vicente <vicencb@gmail.com>
Subject: [PATCH] fix compiler warnings: use puts() instead of printf()
Date: Thu, 21 Feb 2013 09:31:54 +0100 [thread overview]
Message-ID: <1361435514-4474-1-git-send-email-fabio.porcedda@gmail.com> (raw)
Use puts() because printf() isn't necessary,
to fix the following compiler warnings:
/barebox/common/menu.c: In function ‘menu_show’:
/barebox/common/menu.c:277:4: warning: format not a string literal and no format arguments [-Wformat-security]
/barebox/scripts/omap4_usbboot.c: In function ‘read_asic_id’:
/barebox/scripts/omap4_usbboot.c:101:3: warning: format not a string literal and no format arguments [-Wformat-security]
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Vicente <vicencb@gmail.com>
---
| 2 +-
scripts/omap4_usbboot.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--git a/common/menu.c b/common/menu.c
index ce93838..30dced7 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -274,7 +274,7 @@ int menu_show(struct menu *m)
printf("Auto Select in");
} else {
auto_display_len = strlen(m->auto_display);
- printf(m->auto_display);
+ puts(m->auto_display);
}
printf(" %2d", countdown--);
}
diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c
index 8c5775d..34e53c0 100644
--- a/scripts/omap4_usbboot.c
+++ b/scripts/omap4_usbboot.c
@@ -98,7 +98,7 @@ int read_asic_id(struct usb_handle *usb)
sprintf(line+4+j*3, "%02X ", id[i+j]);
line[4+j*3+0] = '\n';
line[4+j*3+1] = 0;
- printf(line);
+ puts(line);
}
ret = 0;
for (i = 1, j = 0; i < sizeof(id) && j < id[0]; i += 2+id[i+1], j++) {
--
1.8.1.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-02-21 8:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 8:31 Fabio Porcedda [this message]
2013-02-21 13:26 ` Sascha Hauer
2013-02-25 12:02 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-25 12:23 ` Fabio Porcedda
2013-02-25 13:16 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-25 15:27 ` Fabio Porcedda
2013-02-25 17:21 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-25 17:38 ` Fabio Porcedda
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=1361435514-4474-1-git-send-email-fabio.porcedda@gmail.com \
--to=fabio.porcedda@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=vicencb@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox