[Mesa-dev] [PATCH 3/3] i965: Mark default case of type_sz() unreachable.
Matt Turner
mattst88 at gmail.com
Wed Jul 15 09:00:43 PDT 2015
Otherwise Coverity thinks we'll divide by zero.
---
src/mesa/drivers/dri/i965/brw_reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index c8b1341..f96b28d 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -283,7 +283,7 @@ type_sz(unsigned type)
case BRW_REGISTER_TYPE_B:
return 1;
default:
- return 0;
+ unreachable("not reached");
}
}
--
2.3.6
More information about the mesa-dev
mailing list