groff-commit
[Top][All Lists]
Advanced

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

[groff] 10/30: [tfmtodit]: Assert more sternly in arg handler.


From: G. Branden Robinson
Subject: [groff] 10/30: [tfmtodit]: Assert more sternly in arg handler.
Date: Sun, 22 Dec 2024 19:39:17 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit c87fd0b742fd9ef1b4929cf6a73e9527f4135163
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 21 15:43:36 2024 -0600

    [tfmtodit]: Assert more sternly in arg handler.
    
    * src/utils/tfmtodit/tfmtodit.cpp (main): Throw assertion on _any_
      unhandled return value from `getopt_long()`, not just EOF.
---
 ChangeLog                       | 5 +++++
 src/utils/tfmtodit/tfmtodit.cpp | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7236d5610..45b01eba6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-12-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/utils/tfmtodit/tfmtodit.cpp (main): Throw assertion on
+       _any_ unhandled return value from `getopt_long()`, not just EOF.
+
 2024-12-21  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/utils/xtotroff/xtotroff.c (main): Throw assertion if we
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index 08666d4b4..54675deb3 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -745,8 +745,7 @@ int main(int argc, char **argv)
       exit(2);
       break;
       break;
-    // XXX ?!
-    case EOF:
+    default:
       assert(0 == "EOF encountered in option processing");
     }
   if (argc - optind != 3) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]