From: Eric Anholt Date: Tue, 25 Aug 2020 18:28:47 +0000 (-0700) Subject: nv50: Fix uninitialized var warnings from using assert() as unreachable(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca73c3bc596eae86aaeb03d0064568e8c0540e07;p=mesa.git nv50: Fix uninitialized var warnings from using assert() as unreachable(). Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp index 8b0489ca2fa..0758ef09331 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp @@ -927,7 +927,7 @@ gv100_interpApply(const FixupEntry *entry, uint32_t *code, const FixupData& data case NV50_IR_INTERP_DEFAULT : sample = 0; break; case NV50_IR_INTERP_CENTROID: sample = 1; break; case NV50_IR_INTERP_OFFSET : sample = 2; break; - default: assert(!"invalid sample mode"); + default: unreachable("invalid sample mode"); } int interp; @@ -936,7 +936,7 @@ gv100_interpApply(const FixupEntry *entry, uint32_t *code, const FixupData& data case NV50_IR_INTERP_PERSPECTIVE: interp = 0; break; case NV50_IR_INTERP_FLAT : interp = 1; break; case NV50_IR_INTERP_SC : interp = 2; break; - default: assert(!"invalid ipa mode"); + default: unreachable("invalid ipa mode"); } code[loc + 2] &= ~(0xf << 12); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gv100.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gv100.cpp index 644d4928327..480b574e393 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gv100.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gv100.cpp @@ -132,8 +132,7 @@ GV100LegalizeSSA::handleLOP2(Instruction *i) case OP_OR : subOp = src0 | src1; break; case OP_XOR: subOp = src0 ^ src1; break; default: - assert(!"invalid LOP2 opcode"); - break; + unreachable("invalid LOP2 opcode"); } bld.mkOp3(OP_LOP3_LUT, TYPE_U32, i->getDef(0), i->getSrc(0), i->getSrc(1),