From: Matt Turner Date: Thu, 23 Oct 2014 22:45:15 +0000 (-0700) Subject: i965/fs: Silence uninitialized variable warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40492be2a4a339b02c38990ad8736644f3a8776b;p=mesa.git i965/fs: Silence uninitialized variable warning. The compiler isn't privy to the knowledge that we're doing at least one framebuffer write. Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index e941c58a36d..983e8db63e0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2601,6 +2601,7 @@ fs_visitor::emit_repclear_shader() write->header_present = false; write->mlen = 1; } else { + assume(key->nr_color_regions > 0); for (int i = 0; i < key->nr_color_regions; ++i) { write = emit(FS_OPCODE_REP_FB_WRITE); write->saturate = key->clamp_fragment_color;