From ca045978faecc2604126a8dcdddaf6aaf0b5fdd7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 19 Feb 2018 09:22:33 +0000 Subject: igt/gem_exec_flush: Silence old compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Joonas Lahtinen --- tests/gem_exec_flush.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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)); -- cgit v1.2.3