* [Qemu-devel] [PATCH] rtl8139: Fix compilation for w32/w64
@ 2011-04-26 8:17 Stefan Weil
2011-04-27 14:23 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2011-04-26 8:17 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: QEMU Developers, Benjamin Poirier
Compilation for Windows needs a different declaration for the
printf format attribute, so use the macro which was defined for
this purpose.
Cc: Benjamin Poirier <benjamin.poirier@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
hw/rtl8139.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 623fb0c..b997fe7 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -88,8 +88,7 @@
# define DPRINTF(fmt, ...) \
do { fprintf(stderr, "RTL8139: " fmt, ## __VA_ARGS__); } while (0)
#else
-static inline __attribute__ ((format (printf, 1, 2)))
- int DPRINTF(const char *fmt, ...)
+static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...)
{
return 0;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] rtl8139: Fix compilation for w32/w64
2011-04-26 8:17 [Qemu-devel] [PATCH] rtl8139: Fix compilation for w32/w64 Stefan Weil
@ 2011-04-27 14:23 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2011-04-27 14:23 UTC (permalink / raw)
To: Stefan Weil; +Cc: Benjamin Poirier, QEMU Developers
On Tue, Apr 26, 2011 at 10:17:48AM +0200, Stefan Weil wrote:
> Compilation for Windows needs a different declaration for the
> printf format attribute, so use the macro which was defined for
> this purpose.
>
> Cc: Benjamin Poirier <benjamin.poirier@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> hw/rtl8139.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
Thanks, applied.
> diff --git a/hw/rtl8139.c b/hw/rtl8139.c
> index 623fb0c..b997fe7 100644
> --- a/hw/rtl8139.c
> +++ b/hw/rtl8139.c
> @@ -88,8 +88,7 @@
> # define DPRINTF(fmt, ...) \
> do { fprintf(stderr, "RTL8139: " fmt, ## __VA_ARGS__); } while (0)
> #else
> -static inline __attribute__ ((format (printf, 1, 2)))
> - int DPRINTF(const char *fmt, ...)
> +static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...)
> {
> return 0;
> }
> --
> 1.7.2.5
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-27 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 8:17 [Qemu-devel] [PATCH] rtl8139: Fix compilation for w32/w64 Stefan Weil
2011-04-27 14:23 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).