[Mesa-dev] [PATCH 2/4] mesa/formats: refactor by removing compressed formats

Chad Versace chad.versace at intel.com
Fri Aug 14 16:04:03 PDT 2015

On Tue 11 Aug 2015, Nanley Chery wrote:
> From: Nanley Chery <nanley.g.chery at intel.com>
> All compressed formats return GL_FALSE. Remove all switch cases for
> compressed formats. Compressed formats should be at the bottom of
> the switch statement, so ordering is still preserved.
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/mesa/main/formats.c | 47 ++---------------------------------------------
>  1 file changed, 2 insertions(+), 45 deletions(-)

This patch has the same issue as patch 1/4. It transforms an
intentionaly exhaustive switch to an unintentionally inexhaustive
switch, spewing compiler warnings.

If you want to move all the compressed cases to the bottom of the
switch, I think that's a good idea. But I think this switch should
remain exhaustive.

More information about the mesa-dev mailing list