[Intel-gfx] [PACTH i-g-t v1] lib/igt_gt: Fix unused variable warning for non-x86 targets

robert.foss at collabora.com robert.foss at collabora.com
Mon Jun 27 10:58:24 UTC 2016


From: Robert Foss <robert.foss at collabora.com>

Moved variable declaration inside #if case to avoid unused variable warnings
on non-x86 targets.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
 lib/igt_gt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index a3d6a73..8a53775 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -383,9 +383,10 @@ int igt_open_forcewake_handle(void)
 		return -1;
 	return igt_debugfs_open("i915_forcewake_user", O_WRONLY);
 }
-static unsigned int clflush_size;
 
 #if defined(__x86_64__) || defined(__i386__)
+static unsigned int clflush_size;
+
 int igt_setup_clflush(void)
 {
 	FILE *file;
-- 
2.7.4



More information about the Intel-gfx mailing list