Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 1 | GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through, |
| 2 | however this causes warnings (which are promoted to errors) with the elfutils |
| 3 | patches from Debian for mips and parisc, which use fallthrough's by design. |
| 4 | |
| 5 | Explicitly mark the intentional fallthrough switch cases with a comment to |
| 6 | disable the warnings where the fallthrough behaviour is desired. |
| 7 | |
| 8 | Upstream-Status: Pending [debian] |
| 9 | Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> |
| 10 | |
| 11 | Index: elfutils-0.168/backends/parisc_retval.c |
| 12 | =================================================================== |
| 13 | --- elfutils-0.168.orig/backends/parisc_retval.c |
| 14 | +++ elfutils-0.168/backends/parisc_retval.c |
| 15 | @@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die |
| 16 | return nloc_intregpair; |
| 17 | |
| 18 | /* Else fall through. */ |
| 19 | - } |
| 20 | + } // fallthrough |
| 21 | |
| 22 | case DW_TAG_structure_type: |
| 23 | case DW_TAG_class_type: |
| 24 | Index: elfutils-0.168/backends/mips_retval.c |
| 25 | =================================================================== |
| 26 | --- elfutils-0.168.orig/backends/mips_retval.c |
| 27 | +++ elfutils-0.168/backends/mips_retval.c |
| 28 | @@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f |
| 29 | else |
| 30 | return nloc_intregpair; |
| 31 | } |
| 32 | - } |
| 33 | + } // fallthrough |
| 34 | |
| 35 | /* Fallthrough to handle large types */ |
| 36 | |