[Mesa-dev] [PATCH 1/2] softpipe: handle more PIPE_CAP_x queries

Brian Paul brianp at vmware.com
Tue Jun 26 13:40:29 PDT 2012


On 06/26/2012 02:25 PM, Marek Olšák wrote:
> On Tue, Jun 26, 2012 at 10:11 PM, Brian Paul<brianp at vmware.com>  wrote:
>> These all return zero.  Add a debug_printf() to catch the default case so
>> we don't accidently mishandle something important in the future.
>
> FWIW, it's better to remove the default statement and move the default
> code after the switch, so that you also get the warning "unhandled
> enum XXX in switch". The idea is not to have the default statement in
> the switch to get the warning.

In other words, let's get a compile-time warning instead of a runtime 
warning.  I'll update the patches...

-Brian



More information about the mesa-dev mailing list