* [Qemu-devel] [PATCH v2] hw/tpci200: Fix compiler warning (redefined symbol with MinGW)
@ 2013-01-21 6:49 Stefan Weil
2013-01-21 10:39 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-01-21 6:49 UTC (permalink / raw)
To: qemu-trivial; +Cc: Stefan Weil, Alberto Garcia, qemu-devel
STATUS_TIMEOUT is defined in winnt.h:
CC hw/tpci200.o
hw/tpci200.c:34:0:
warning: "STATUS_TIMEOUT" redefined [enabled by default]
/usr/lib/gcc/x86_64-w64-mingw32/4.6/../../../../x86_64-w64-mingw32/include/winnt.h:1036:0:
note: this is the location of the previous definition
Use STATUS_TIME instead of STATUS_TIMEOUT as suggested by Alberto Garcia.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
v1: Add QEMU_PREFIX (http://patchwork.ozlabs.org/patch/212348/)
v2: Use STATUS_TIME
Like v1, this patch fixes a warning for MinGW.
We could also mix v1 and v2.
Please commit one of those variants to git master.
Regards,
Stefan W.
hw/tpci200.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/tpci200.c b/hw/tpci200.c
index e082bca..a4823fb 100644
--- a/hw/tpci200.c
+++ b/hw/tpci200.c
@@ -31,7 +31,7 @@
#define IP_INT_SPACE_ADDR_MASK 0x3F
#define STATUS_INT(IP, INTNO) BIT((IP) * 2 + (INTNO))
-#define STATUS_TIMEOUT(IP) BIT((IP) + 12)
+#define STATUS_TIME(IP) BIT((IP) + 12)
#define STATUS_ERR_ANY 0xF00
#define CTRL_CLKRATE BIT(0)
@@ -279,9 +279,9 @@ static void tpci200_write_las0(void *opaque, hwaddr addr, uint64_t val,
}
}
- if (val & STATUS_TIMEOUT(i)) {
+ if (val & STATUS_TIME(i)) {
DPRINTF("Clear IP %c timeout\n", 'A' + i);
- s->status &= ~STATUS_TIMEOUT(i);
+ s->status &= ~STATUS_TIME(i);
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2] hw/tpci200: Fix compiler warning (redefined symbol with MinGW)
2013-01-21 6:49 [Qemu-devel] [PATCH v2] hw/tpci200: Fix compiler warning (redefined symbol with MinGW) Stefan Weil
@ 2013-01-21 10:39 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-01-21 10:39 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, Alberto Garcia, qemu-devel
On Mon, Jan 21, 2013 at 07:49:51AM +0100, Stefan Weil wrote:
> STATUS_TIMEOUT is defined in winnt.h:
>
> CC hw/tpci200.o
> hw/tpci200.c:34:0:
> warning: "STATUS_TIMEOUT" redefined [enabled by default]
> /usr/lib/gcc/x86_64-w64-mingw32/4.6/../../../../x86_64-w64-mingw32/include/winnt.h:1036:0:
> note: this is the location of the previous definition
>
> Use STATUS_TIME instead of STATUS_TIMEOUT as suggested by Alberto Garcia.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> v1: Add QEMU_PREFIX (http://patchwork.ozlabs.org/patch/212348/)
> v2: Use STATUS_TIME
>
> Like v1, this patch fixes a warning for MinGW.
> We could also mix v1 and v2.
>
> Please commit one of those variants to git master.
>
> Regards,
> Stefan W.
>
>
> hw/tpci200.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-21 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 6:49 [Qemu-devel] [PATCH v2] hw/tpci200: Fix compiler warning (redefined symbol with MinGW) Stefan Weil
2013-01-21 10:39 ` Stefan Hajnoczi
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).