gbranden pushed a commit to branch master
in repository groff.
commit c87fd0b742fd9ef1b4929cf6a73e9527f4135163
Author: G. Branden Robinson <[email protected]>
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 <[email protected]>
+
+ * 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 <[email protected]>
* 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) {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit