[igt-dev] [PATCH i-g-t 20/21] lib/igt_x86: Mock-use variable to silence static analysis
Petri Latvala
petri.latvala at intel.com
Wed Jan 16 11:20:49 UTC 2019
x86_features_to_string() uses a repeatable pattern that increments a
pointer for each feature string, leaving a dead assignment for the
last one. Add a (void)line to the end just to silence static analysis.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
lib/igt_x86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/igt_x86.c b/lib/igt_x86.c
index cb1e0a72..88e514df 100644
--- a/lib/igt_x86.c
+++ b/lib/igt_x86.c
@@ -175,6 +175,8 @@ char *igt_x86_features_to_string(unsigned features, char *line)
if (features & AVX2)
line += sprintf(line, ", avx2");
+ (void)line;
+
return ret;
}
#endif
--
2.19.1
More information about the igt-dev
mailing list