[vte] build: Use "fallthrough" consistently



commit 22f5fabbd1c3b97000ed6cb4a963d429a2c79bab
Author: Egmont Koblinger <egmont gmail com>
Date:   Sat Sep 14 21:36:04 2019 +0200

    build: Use "fallthrough" consistently
    
    https://gitlab.gnome.org/GNOME/vte/issues/168

 src/parser-glue.hh | 7 +------
 src/vteseq.cc      | 8 ++++----
 2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/parser-glue.hh b/src/parser-glue.hh
index 7c9aa5d1..90c41379 100644
--- a/src/parser-glue.hh
+++ b/src/parser-glue.hh
@@ -661,14 +661,9 @@ private:
                 case VTE_SEQ_ESCAPE:
                 case VTE_SEQ_CSI:
                 case VTE_SEQ_DCS:
-                        #pragma GCC diagnostic push
-                        #if G_GNUC_CHECK_VERSION(7, 0)
-                        #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
-                        #endif
                         for (unsigned char n = 0; n < m_n_intermediates; n++)
                                 s.push_back(m_intermediates[n]);
-                        /* [[fallthrough]]; */
-                        #pragma GCC diagnostic pop
+                        [[fallthrough]];
                 case VTE_SEQ_SCI:
                         if (m_seq.terminator != 0)
                                 s.push_back(m_seq.terminator);
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 9ee15477..6d85911f 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -553,9 +553,9 @@ Terminal::set_mode_private(int mode,
                 break;
 
         case vte::terminal::modes::Private::eXTERM_ALTBUF:
-                /* [[fallthrough]]; */
+                [[fallthrough]];
         case vte::terminal::modes::Private::eXTERM_OPT_ALTBUF:
-                /* [[fallthrough]]; */
+                [[fallthrough]];
         case vte::terminal::modes::Private::eXTERM_OPT_ALTBUF_SAVE_CURSOR:
                 if (set) {
                         if (mode == vte::terminal::modes::Private::eXTERM_OPT_ALTBUF_SAVE_CURSOR)
@@ -2101,7 +2101,7 @@ Terminal::CTC(vte::parser::Sequence const& seq)
 
         case 4:
                 /* Clear all tabstops in the active line */
-                /* [[fallthrough]]; */
+                [[fallthrough]];
         case 5:
                 /* Clear all tabstops */
                 m_tabstops.clear();
@@ -5223,7 +5223,7 @@ Terminal::DSR_DEC(vte::parser::Sequence const& seq)
 
         case 53:
                 /* XTERM alias for 55 */
-                /* [[fallthrough]]; */
+                [[fallthrough]];
         case 55:
                 /* Request locator status report
                  * Reply: DECDSR


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]