* [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b)
@ 2011-12-03 5:44 Jean-Christophe PLAGNIOL-VILLARD
2011-12-03 5:44 ` [PATCH 2/2] stdio: convert __attribute__ ((format(printf, a, b))) to __printf(a, b) Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 8:48 ` [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b) Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-03 5:44 UTC (permalink / raw)
To: barebox
to fix warning 'barebox_printf' is an unrecognized format function type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
include/linux/compiler-gcc.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 73dcf80..d363fdb 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -75,7 +75,7 @@
*/
#define __pure __attribute__((pure))
#define __aligned(x) __attribute__((aligned(x)))
-#define __printf(a,b) __attribute__((format(printf,a,b)))
+#define __printf(a,b) __attribute__((format(__printf__,a,b)))
#define noinline __attribute__((noinline))
#define __attribute_const__ __attribute__((__const__))
#define __maybe_unused __attribute__((unused))
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] stdio: convert __attribute__ ((format(printf, a, b))) to __printf(a, b)
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
2011-12-05 8:48 ` [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b) Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-03 5:44 UTC (permalink / raw)
To: barebox
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b)
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 ` [PATCH 2/2] stdio: convert __attribute__ ((format(printf, a, b))) to __printf(a, b) Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-05 8:48 ` Sascha Hauer
2011-12-05 15:07 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2011-12-05 8:48 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Sat, Dec 03, 2011 at 06:44:43AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> to fix warning 'barebox_printf' is an unrecognized format function type
Where do you see this warning? I do not get it anymore since Loic fixed
it.
Sascha
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> include/linux/compiler-gcc.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
> index 73dcf80..d363fdb 100644
> --- a/include/linux/compiler-gcc.h
> +++ b/include/linux/compiler-gcc.h
> @@ -75,7 +75,7 @@
> */
> #define __pure __attribute__((pure))
> #define __aligned(x) __attribute__((aligned(x)))
> -#define __printf(a,b) __attribute__((format(printf,a,b)))
> +#define __printf(a,b) __attribute__((format(__printf__,a,b)))
> #define noinline __attribute__((noinline))
> #define __attribute_const__ __attribute__((__const__))
> #define __maybe_unused __attribute__((unused))
> --
> 1.7.7
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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] 4+ messages in thread
* Re: [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b)
2011-12-05 8:48 ` [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b) Sascha Hauer
@ 2011-12-05 15:07 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-05 15:07 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 09:48 Mon 05 Dec , Sascha Hauer wrote:
> On Sat, Dec 03, 2011 at 06:44:43AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > to fix warning 'barebox_printf' is an unrecognized format function type
>
> Where do you see this warning? I do not get it anymore since Loic fixed
> it.
__printf is the right way to fix it so use it
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] stdio: convert __attribute__ ((format(printf, a, b))) to __printf(a, b) Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 8:48 ` [PATCH 1/2] use format(__printf__, a, b) instead of formart(printf, a, b) Sascha Hauer
2011-12-05 15:07 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox