From: Eric Anholt Date: Sat, 10 Feb 2018 11:19:00 +0000 (+0000) Subject: i965: Fix compiler warning about write being undefined. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afa7b2f19975f45234637f47859fdd768551a080;p=mesa.git i965: Fix compiler warning about write being undefined. This looks like it should be protected by the assume() about nr_color_regions, but my compiler warns anyway. Reviewed-by: Matt Turner --- diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 6fb46e7374c..bed632d21b9 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -3070,7 +3070,7 @@ fs_visitor::emit_repclear_shader() .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(reg)); } - fs_inst *write; + fs_inst *write = NULL; if (key->nr_color_regions == 1) { write = bld.emit(FS_OPCODE_REP_FB_WRITE); write->saturate = key->clamp_fragment_color;