[Intel-gfx] [PATCH 2/2] intel: Silence warning in non-Valgrind build
Ian Romanick
idr at freedesktop.org
Mon Nov 11 18:48:27 CET 2013
From: Ian Romanick <ian.d.romanick at intel.com>
Previously GCC was squaking about:
intel_bufmgr_gem.c: In function 'drm_intel_gem_bo_map_unsynchronized':
intel_bufmgr_gem.c:1325:20: warning: unused variable 'bo_gem' [-Wunused-variable]
Wrapping with VG(); replaced that warning with:
intel_bufmgr_gem.c: In function 'drm_intel_gem_bo_map_unsynchronized':
intel_bufmgr_gem.c:1326:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Which, looking at the definition of the VG macro, seems a bit weird.
It's caused by the dangling ";" left from the empty macro.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Chia-I Wu <olvaffe at gmail.com>
---
intel/intel_bufmgr_gem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 5b64a7f..dbadc52 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1322,7 +1322,9 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
int drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
+#ifdef HAVE_VALGRIND
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+#endif
int ret;
/* If the CPU cache isn't coherent with the GTT, then use a
--
1.8.1.4
More information about the Intel-gfx
mailing list