summaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorLoïc Minier <loic.minier@linaro.org>2011-10-14 00:06:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-10-18 09:18:41 +0200
commit3808cb7a451a032c9181e6b3ed3f88b62eb46ee7 (patch)
tree89101b528f3eab8bbcc184962eaee59c51c74868 /scripts/mod
parent4e26fba6803b0b4820875df50ed733eeb4980d60 (diff)
downloadbarebox-3808cb7a451a032c9181e6b3ed3f88b62eb46ee7.tar.gz
barebox-3808cb7a451a032c9181e6b3ed3f88b62eb46ee7.tar.xz
Avoid warnings by using format(__printf__)
When building sandbox, barebox is built with -Dprintf=barebox_printf as to not collide with the printf provided by libc. This would also match the format(printf) function __attribute__. Since gcc documents that __printf__ can be used instead of printf as a format attribute, use this instead and avoid a lot of noisy warnings. NB: this relates to 6b082cfe9f9b5b2bea294918ad916c739490cea7 which was an earlier attempt at solving this, which got reverted due to other regressions. Signed-off-by: Loïc Minier <loic.minier@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c2
-rw-r--r--scripts/mod/modpost.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 08b75b67f1..e99448602c 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1300,7 +1300,7 @@ static void read_symbols(char *modname)
* following helper, then compare to the file on disk and
* only update the later if anything changed */
-void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
+void __attribute__((format(__printf__, 2, 3))) buf_printf(struct buffer *buf,
const char *fmt, ...)
{
char tmp[SZ];
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 4156dd34c5..0c23259836 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -94,7 +94,7 @@ struct buffer {
int size;
};
-void __attribute__((format(printf, 2, 3)))
+void __attribute__((format(__printf__, 2, 3)))
buf_printf(struct buffer *buf, const char *fmt, ...);
void