Skip to contentSkip to conversation

tci: Fix broken build (compiler warning caused by redefined macro BIT)

PATCH Applied Stefan Weil 3 participants 3 messages Jul 30, 2013 – Aug 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tci: Fix broken build (compiler warning caused by redefined macro BIT)

The definition of macro BIT in tci/tcg-target.c now conflicts with the definition of the same macro in includes qemu/bitops.h.

This conflict was triggered by a recent change in the include chain of tcg.c (probably commit 949fc82314cc84162e64a5323764527a542421ce).

---
 tcg/tci/tcg-target.c |    3 ---
 1 file changed, 3 deletions(-)
tcg/tci/tcg-target.c +0 -3
index d1241b5..e118bc7 100644
@@ -34,9 +34,6 @@
         tcg_abort(); \
     } while (0)
 
-/* Single bit n. */
-#define BIT(n) (1 << (n))
-
 /* Bitfield n...m (in 32 bit value). */
 #define BITS(n, m) (((0xffffffffU << (31 - n)) >> (31 - n + m)) << m)
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Stefan Weil

The definition of macro BIT in tci/tcg-target.c now conflicts with the definition of the same macro in includes qemu/bitops.h.

This conflict was triggered by a recent change in the include chain of tcg.c (probably commit 949fc82314cc84162e64a5323764527a542421ce).

I would add explicit "#include qemu/bitops.h"
For some reason the compilation was ok when the path was submitted, thanks!
Marcel

Quoted 20 lines
---
 tcg/tci/tcg-target.c |    3 ---
 1 file changed, 3 deletions(-)
tcg/tci/tcg-target.c +0 -3
index d1241b5..e118bc7 100644
@@ -34,9 +34,6 @@
         tcg_abort(); \
     } while (0)
 
-/* Single bit n. */
-#define BIT(n) (1 << (n))
-
 /* Bitfield n...m (in 32 bit value). */
 #define BITS(n, m) (((0xffffffffU << (31 - n)) >> (31 - n + m)) << m)