On 24 April 2018 at 13:50, Alvaro Herrera wrote:
> David Rowley wrote:
>> On 24 April 2018 at 03:12, Alvaro Herrera wrote:
>> > Remove useless default clause in switch
>> >
>> > The switch covers all values of the enum driver variable, so having a
>> > default: clause is useless, even if it's onl
David Rowley wrote:
> On 24 April 2018 at 03:12, Alvaro Herrera wrote:
> > Remove useless default clause in switch
> >
> > The switch covers all values of the enum driver variable, so having a
> > default: clause is useless, even if it's only to do Assert(false).
>
> Just for my own understanding
On 2018/04/24 10:20, Michael Paquier wrote:
> On Tue, Apr 24, 2018 at 12:27:27PM +1200, David Rowley wrote:
>> I always thought that when all options were covered that we generally
>> kept a default just in case someone added another enum and forgot to
>> update the code.
>>
>> I know generally tho
On Tue, Apr 24, 2018 at 12:27:27PM +1200, David Rowley wrote:
> I always thought that when all options were covered that we generally
> kept a default just in case someone added another enum and forgot to
> update the code.
>
> I know generally those are with elog ERRORs but both would be designed
> "David" == David Rowley writes:
David> I always thought that when all options were covered that we
David> generally kept a default just in case someone added another enum
David> and forgot to update the code.
That's what compiler warnings (-Wswitch, included in -Wall) are for;
it's actu
David Rowley writes:
> On 24 April 2018 at 03:12, Alvaro Herrera wrote:
>> Remove useless default clause in switch
> I always thought that when all options were covered that we generally
> kept a default just in case someone added another enum and forgot to
> update the code.
Actually, there's
On 24 April 2018 at 03:12, Alvaro Herrera wrote:
> Remove useless default clause in switch
>
> The switch covers all values of the enum driver variable, so having a
> default: clause is useless, even if it's only to do Assert(false).
Just for my own understanding:
I always thought that when all
Remove useless default clause in switch
The switch covers all values of the enum driver variable, so having a
default: clause is useless, even if it's only to do Assert(false).
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/dfce1f9e4eef3adcccbb23670fa1c432eebb0b90