aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-23 07:38:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-23 08:07:08 +0000
commit9db78c3122fd3dcd87c1b60ea41f3ad74ff227ba (patch)
tree7fc6ddedefd0ce6ac5c08e58fca5476bc27c0a44
parentDon't use "case X ... Y:", if possible/where it makes sense (diff)
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.
-rw-r--r--vt.c9
1 files changed, 9 insertions, 0 deletions
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)
{