Skip to contentSkip to conversation

lib/igt_gt: Fix unused variable warning for non-x86 targets

PATCH Applied [email protected] 3 participants 3 messages Jun 27, 2016 – Jul 4, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/igt_gt: Fix unused variable warning for non-x86 targets

From: Robert Foss <[email protected]>

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

---
 lib/igt_gt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/igt_gt.c +2 -1
index a3d6a73..8a53775 100644
@@ -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;
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Mon, Jun 27, 2016 at 06:58:24AM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

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

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Applied
#2 lore raw
In reply to [email protected]

Applied.

Quoted 29 lines · On Mon, Jun 27, 2016 at 06:58:24AM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

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

---
 lib/igt_gt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/igt_gt.c +2 -1
index a3d6a73..8a53775 100644
@@ -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;
Signature · 1 line
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx