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*)::<anonymous union>::ud’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       reg->dw1.ud = sat_imm.ud;
                               ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Vinson Lee 2015-03-06 22:08:00 -08:00
parent 282f67becd
commit 13f4963ed2

View file

@ -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: