[Mesa-dev] [PATCH] isl: Mark default cases in switch unreachable.
Matt Turner
mattst88 at gmail.com
Mon May 16 19:08:13 UTC 2016
To silence -Wmaybe-uninitialized warnings.
---
src/intel/isl/isl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 6e492af..ca2db84 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -151,6 +151,9 @@ isl_tiling_get_info(const struct isl_device *dev,
height = 1 << (6 - (ffs(bs) / 2) + (2 * is_Ys));
break;
}
+
+ default:
+ unreachable("not reached");
} /* end switch */
*tile_info = (struct isl_tile_info) {
@@ -1387,6 +1390,9 @@ get_image_offset_sa(const struct isl_surf *surf,
get_image_offset_sa_gen4_3d(surf, level, logical_z_offset_px,
x_offset_sa, y_offset_sa);
break;
+
+ default:
+ unreachable("not reached");
}
}
--
2.7.3
More information about the mesa-dev
mailing list