From c3ca384e7190656afcd9f5143e811843efa2b3cb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 9 Dec 2010 14:17:17 -0800 Subject: i965: Silence uninitialized variable warning. Fixes this GCC warning. brw_fs.cpp: In function 'brw_reg brw_reg_from_fs_reg(fs_reg*)': brw_fs.cpp:3255: warning: 'brw_reg' may be used uninitialized in this function --- src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 6bb195b487..c3cbe0df61 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3280,6 +3280,7 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg) break; default: assert(!"not reached"); + brw_reg = brw_null_reg(); break; } break; @@ -3294,6 +3295,10 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg) assert(!"not reached"); brw_reg = brw_null_reg(); break; + default: + assert(!"not reached"); + brw_reg = brw_null_reg(); + break; } if (reg->abs) brw_reg = brw_abs(brw_reg); -- cgit v1.2.3