From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] stdio: convert __attribute__ ((format(printf, a, b))) to __printf(a, b)
Date: Sat, 3 Dec 2011 06:44:44 +0100 [thread overview]
Message-ID: <1322891084-446-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1322891084-446-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
include/stdio.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/stdio.h b/include/stdio.h
index 4901bc7..94e810f 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -9,7 +9,7 @@
*/
/* serial stuff */
-void serial_printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+void serial_printf(const char *fmt, ...) __printf(1, 2);
/* stdin */
int tstc(void);
@@ -30,12 +30,12 @@ static inline void putchar(char c)
console_putc(CONSOLE_STDOUT, c);
}
-int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+int printf(const char *fmt, ...) __printf(1, 2);
int vprintf(const char *fmt, va_list args);
-int sprintf(char *buf, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
-int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format(__printf__, 3, 4)));
+int sprintf(char *buf, const char *fmt, ...) __printf(2, 3);
+int snprintf(char *buf, size_t size, const char *fmt, ...) __printf(3, 4);
int vsprintf(char *buf, const char *fmt, va_list args);
-char *asprintf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+char *asprintf(const char *fmt, ...) __printf(1, 2);
char *vasprintf(const char *fmt, va_list ap);
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
@@ -54,7 +54,7 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
#define stderr 2
#define MAX_FILES 128
-int fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
+int fprintf(int file, const char *fmt, ...) __printf(2, 3);
int fputs(int file, const char *s);
int fputc(int file, const char c);
int ftstc(int file);
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-12-03 5:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-03 5:44 [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b) Jean-Christophe PLAGNIOL-VILLARD
2011-12-03 5:44 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-12-05 8:48 ` Sascha Hauer
2011-12-05 15:07 ` Jean-Christophe PLAGNIOL-VILLARD
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=1322891084-446-2-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/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