From 60b567ee59b96b9fa334bf59d3d443c29c590c54 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 4 Aug 2013 00:13:53 -0700 Subject: [PATCH] nvc0: Initialize ptr for unexpected sample_count on release builds. Fixes "Uninitialized pointer read" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- src/gallium/drivers/nvc0/nvc0_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c index cd86040ab01..8cd5fc5a646 100644 --- a/src/gallium/drivers/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nvc0/nvc0_context.c @@ -394,6 +394,7 @@ nvc0_context_get_sample_position(struct pipe_context *pipe, case 8: ptr = ms8; break; default: assert(0); + ptr = ms1; break; } xy[0] = ptr[sample_index][0] * 0.0625f; -- 2.30.2