[Mesa-dev] [PATCH] radeonsi: Ensure fmask_format is initialized in release builds.

Vinson Lee vlee at freedesktop.org
Sat Aug 17 15:51:34 PDT 2013


Fixes "Uninitialized scalar variable" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 06c349d..6410e45 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2728,6 +2728,7 @@ static struct pipe_sampler_view *si_create_sampler_view(struct pipe_context *ctx
 			break;
 		default:
 			assert(0);
+			fmask_format = V_008F14_IMG_DATA_FORMAT_INVALID;
 		}
 
 		view->fmask_state[0] = va >> 8;
-- 
1.8.3.1



More information about the mesa-dev mailing list