Re: [PATCH v2 1/6] midx: add MIDX_PROGRESS flag <snip>
- From
- William Baker <williamtbakeremail@gmail.com>
- Date
- Oct 2, 2019, 15:56 UTC
- Message-ID
- <8ec5513c-fcfa-bc55-5d73-6aa6528ac4dc@gmail.com>
- In-Reply-To
- <xmqqlfu3eigp.fsf@gitster-ct.c.googlers.com>
On 10/2/19 12:04 AM, Junio C Hamano wrote>>
Show 17 quoted lines
>> Well, if you write
>>
>> enum { BIT_0 = 1, BIT_1 = 2, BIT_3 = 4 } var;
>>
>> it's pretty much a promise that the normal value for the var is one
>> of these listed values to your readers.
>
> ... that is why compilers give a warning when you write
>
> switch (var) {
> case ...:
> ...
> }
>
> and do not have case arms for all the declared enum values without
> having the 'default' arm.
> Thanks for all of the details and feedback here. I can leave the flag as-is (and not switch to enum).
Thanks, William