From afa7b2f19975f45234637f47859fdd768551a080 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 10 Feb 2018 11:19:00 +0000 Subject: [PATCH] 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 --- src/intel/compiler/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0