mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03:00
Explicitly annotate intentional switch fallthrough
This silences a very useful warning in GCC 10.
This commit is contained in:
@@ -198,3 +198,9 @@
|
||||
#else
|
||||
#define __warn_unused_type
|
||||
#endif
|
||||
|
||||
#if __has_attribute(fallthrough)
|
||||
#define __fallthrough__ __attribute__ ((fallthrough))
|
||||
#else
|
||||
#define __fallthrough__
|
||||
#endif
|
||||
|
||||
@@ -2941,9 +2941,9 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
||||
parser().libdata().is_repaint = false;
|
||||
break;
|
||||
}
|
||||
// Else we repaint as normal
|
||||
// Else we repaint as normal.
|
||||
__fallthrough__
|
||||
}
|
||||
/* fallthrough */
|
||||
case rl::force_repaint:
|
||||
case rl::repaint: {
|
||||
parser().libdata().is_repaint = true;
|
||||
|
||||
Reference in New Issue
Block a user