[PATCH] Fix compiler warning (unused variable)
Luca Tettamanti
kronos.it at gmail.com
Sun Sep 13 11:47:56 PDT 2009
The variable 'info' is used inside BEGIN_BATCH macro only when
XF86DRM_MODE is defined. When KMS support is not present the variable is
not used and this causes many warnings (especially in r6xx_accel.c).
This patch changes BEGIN_BATCH and similar macros to evaluate the
variable suppressing the warning.
Signed-off-by: Luca Tettamanti <kronos.it at gmail.com>
---
src/r600_state.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/r600_state.h b/src/r600_state.h
index cb039d4..ac151a3 100644
--- a/src/r600_state.h
+++ b/src/r600_state.h
@@ -206,9 +206,9 @@ do { \
} \
} while (0)
#else
-#define BEGIN_BATCH(n) do {} while(0)
-#define END_BATCH() do {} while(0)
-#define RELOC_BATCH(bo, wd, rd) do {} while(0)
+#define BEGIN_BATCH(n) do { (void)(info); } while(0)
+#define END_BATCH() do { (void)(info); } while(0)
+#define RELOC_BATCH(bo, wd, rd) do { (void)(info); } while(0)
#define E32(ib, dword) \
do { \
uint32_t *ib_head = (pointer)(char*)(ib)->address; \
--
"Sei l'unica donna della mia vita".
(Adamo)
More information about the xorg-driver-ati
mailing list