From: Vinson Lee Date: Sat, 7 Mar 2015 06:08:00 +0000 (-0800) Subject: i965: Silence GCC maybe-uninitialized warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13f4963ed2de90680841658af4561ef7ab238406;p=mesa.git i965: Silence GCC maybe-uninitialized warning. brw_shader.cpp: In function ‘bool brw_saturate_immediate(brw_reg_type, brw_reg*)’: brw_shader.cpp:618:31: warning: ‘sat_imm.brw_saturate_immediate(brw_reg_type, brw_reg*)::::ud’ may be used uninitialized in this function [-Wmaybe-uninitialized] reg->dw1.ud = sat_imm.ud; ^ Signed-off-by: Vinson Lee Reviewed-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index f2b4d824218..ff0ef4b8f82 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -584,7 +584,7 @@ brw_saturate_immediate(enum brw_reg_type type, struct brw_reg *reg) unsigned ud; int d; float f; - } imm = { reg->dw1.ud }, sat_imm; + } imm = { reg->dw1.ud }, sat_imm = { 0 }; switch (type) { case BRW_REGISTER_TYPE_UD: