From: Vinson Lee Date: Thu, 17 May 2012 06:44:53 +0000 (-0700) Subject: gallium/tgsi/text: Ensure ret is initialized in parse_immediate_data. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8a86d36f3b007ae6fca9353a3a4cda1456ae1d4;p=mesa.git gallium/tgsi/text: Ensure ret is initialized in parse_immediate_data. Fix uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 279a046e202..f2bf49e9f88 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -1007,6 +1007,10 @@ static boolean parse_immediate_data(struct translate_ctx *ctx, unsigned type, case TGSI_IMM_INT32: ret = parse_int(&ctx->cur, &values[i].Int); break; + default: + assert(0); + ret = FALSE; + break; } if (!ret) {