[igt-dev] [PATCH i-g-t 20/21] lib/igt_x86: Mock-use variable to silence static analysis

Petri Latvala
2019-01-16T11:21:04Z

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@intel.com>
Cc: Chris Wilson <chris@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