Re: [PATCH v2 18/29] grep: catch a missing enum in switch statement

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 7:50 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Add a die(...) to a default case for the switch statement selecting >> between grep pattern types under --recurse-submodules. >> >> Normally this would be caught by -Wswitch, but the grep_pattern_type >

Re: [PATCH v2 18/29] grep: catch a missing enum in switch statement

2017-05-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Add a die(...) to a default case for the switch statement selecting > between grep pattern types under --recurse-submodules. > > Normally this would be caught by -Wswitch, but the grep_pattern_type > type is converted to int by going through parse_options(). Cha

[PATCH v2 18/29] grep: catch a missing enum in switch statement

2017-05-13 Thread Ævar Arnfjörð Bjarmason
Add a die(...) to a default case for the switch statement selecting between grep pattern types under --recurse-submodules. Normally this would be caught by -Wswitch, but the grep_pattern_type type is converted to int by going through parse_options(). Changing the argument type passed to compile_su