Message ID | 20180220084520.27965-4-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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));
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> --- tests/gem_exec_flush.c | 5 +++++ 1 file changed, 5 insertions(+)