gbranden pushed a commit to branch master
in repository groff.

commit 473cc926406c4b022b219085c493d360b7914439
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 2 21:18:43 2026 -0600

    src/preproc/soelim/soelim.cpp: Add assert(3).
    
    * src/preproc/soelim/soelim.cpp (do_file): Add assert(3)ion that FSM is
      in a valid state when handling the end of a file.
---
 ChangeLog                     | 5 +++++
 src/preproc/soelim/soelim.cpp | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 407690ef6..27ab14b84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-11-02  G. Branden Robinson <[email protected]>
+
+       * src/preproc/soelim/soelim.cpp (do_file): Add assert(3)ion that
+       FSM is in a valid state when handling the end of a file.
+
 2026-11-02  G. Branden Robinson <[email protected]>
 
        [soelim]: Test `-t` option operation.
diff --git a/src/preproc/soelim/soelim.cpp b/src/preproc/soelim/soelim.cpp
index dfa6b5b03..f815bbeba 100644
--- a/src/preproc/soelim/soelim.cpp
+++ b/src/preproc/soelim/soelim.cpp
@@ -357,6 +357,8 @@ static bool do_file(const char *filename)
     break;
   case START:
     break;
+  default:
+    assert(0 == "unhandled state in file parser at EOF");
   }
   if (fp != stdin)
     if (fclose(fp) < 0)

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to