mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Explicitly annotate intentional switch fallthrough
This silences a very useful warning in GCC 10.
This commit is contained in:
parent
b7e892d545
commit
ea1a4b7932
2 changed files with 8 additions and 2 deletions
|
@ -198,3 +198,9 @@
|
||||||
#else
|
#else
|
||||||
#define __warn_unused_type
|
#define __warn_unused_type
|
||||||
#endif
|
#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;
|
parser().libdata().is_repaint = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Else we repaint as normal
|
// Else we repaint as normal.
|
||||||
|
__fallthrough__
|
||||||
}
|
}
|
||||||
/* fallthrough */
|
|
||||||
case rl::force_repaint:
|
case rl::force_repaint:
|
||||||
case rl::repaint: {
|
case rl::repaint: {
|
||||||
parser().libdata().is_repaint = true;
|
parser().libdata().is_repaint = true;
|
||||||
|
|
Loading…
Reference in a new issue