summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-02-19 09:22:33 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-20 09:14:59 +0000
commitca045978faecc2604126a8dcdddaf6aaf0b5fdd7 (patch)
treefda1eb824c6dc5a3f2a58f65df92d1bc2a9f6f7d
parent4a03bd897f2d46e651c62c9fe3172cbaae20552e (diff)
igt/gem_exec_flush: Silence old compiler warning
gem_exec_flush.c: In function ‘batch’: gem_exec_flush.c:443:15: warning: ‘ptr’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
-rw-r--r--tests/gem_exec_flush.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index c93eee4b..f820b2a8 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -426,6 +426,11 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
ptr = mmap(0, 64<<10, PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
break;
+
+ default:
+ igt_assert(!"reachable");
+ ptr = NULL;
+ break;
}
memset(&reloc, 0, sizeof(reloc));