[vte] parser: Assert that the parser is not in an unknown state



commit 072274d0ef5a0a3729a51ad14f6a9d32c445b505
Author: Christian Persch <chpe src gnome org>
Date:   Wed Nov 28 20:36:47 2018 +0100

    parser: Assert that the parser is not in an unknown state
    
    Don't print a useless warning, but use an assertion instead.

 src/parser.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/parser.cc b/src/parser.cc
index 5476313e..285b3241 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1361,8 +1361,8 @@ parser_feed_to_state(vte_parser_t* parser,
                                          ACTION_IGNORE);
         }
 
-        g_warning("bad vte-parser state");
-        return -EINVAL;
+        g_assert_not_reached();
+        return VTE_SEQ_NONE;
 }
 
 int


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