qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.5] spitz: Fix compiler warning (MinGW-w64)
@ 2013-05-18 12:02 Stefan Weil
  2013-05-20 11:36 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-05-18 12:02 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Paolo Bonzini, qemu-devel, Stefan Weil

Macro MOD_SHIFT is also defined in imm.h:

/qemu/hw/arm/spitz.c:280:1: warning: "MOD_SHIFT" redefined
/usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/imm.h:309:1:
 warning: this is the location of the previous definition

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/arm/spitz.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index b5ed109..5be68eb 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -277,6 +277,8 @@ static void spitz_keyboard_keydown(SpitzKeyboardState *s, int keycode)
     spitz_keyboard_sense_update(s);
 }
 
+#undef MOD_SHIFT /* avoid redefinition, see imm.h from MinGW-w64 */
+
 #define MOD_SHIFT   (1 << 7)
 #define MOD_CTRL    (1 << 8)
 #define MOD_FN      (1 << 9)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH for-1.5] spitz: Fix compiler warning (MinGW-w64)
  2013-05-18 12:02 [Qemu-devel] [PATCH for-1.5] spitz: Fix compiler warning (MinGW-w64) Stefan Weil
@ 2013-05-20 11:36 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2013-05-20 11:36 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Paolo Bonzini, Anthony Liguori, qemu-devel

On 18 May 2013 13:02, Stefan Weil <sw@weilnetz.de> wrote:
> Macro MOD_SHIFT is also defined in imm.h:
>
> /qemu/hw/arm/spitz.c:280:1: warning: "MOD_SHIFT" redefined
> /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/imm.h:309:1:
>  warning: this is the location of the previous definition

> +#undef MOD_SHIFT /* avoid redefinition, see imm.h from MinGW-w64 */
> +

I guess this is the minimal fix for 1.5, but it's pretty ugly.
Isn't it possible to avoid the Windows headers getting dragged
in somehow?

thanks
-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-20 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-18 12:02 [Qemu-devel] [PATCH for-1.5] spitz: Fix compiler warning (MinGW-w64) Stefan Weil
2013-05-20 11:36 ` Peter Maydell

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).