From 9db78c3122fd3dcd87c1b60ea41f3ad74ff227ba Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 23 Aug 2020 09:38:37 +0200 Subject: vt: hide pedantic warnings around the VT state machine's switch cases The switch statements use the GCC extension "case X ... Y", and here it doesn't really make any sense to convert it to "case X: case Y:", so hide the warnings instead. --- vt.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vt.c') diff --git a/vt.c b/vt.c index 7485fa43..6b6bbd0b 100644 --- a/vt.c +++ b/vt.c @@ -734,6 +734,11 @@ action_utf8_44(struct terminal *term, uint8_t c) action_utf8_print(term, term->vt.utf8); } +#if defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" +#endif + static enum state state_ground_switch(struct terminal *term, uint8_t data) { @@ -1256,6 +1261,10 @@ state_utf8_43_switch(struct terminal *term, uint8_t data) } } +#if defined(__GNUC__) + #pragma GCC diagnostic pop +#endif + void vt_from_slave(struct terminal *term, const uint8_t *data, size_t len) { -- cgit v1.3