gbranden pushed a commit to branch master
in repository groff.
commit 045067309bd5a24e9e8d7543910f23322e26e8c9
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Apr 4 16:21:09 2026 -0500
[eqn]: Stick a dummy in GCC 9.5.0's mouth.
...as the Brits might say.
* src/preproc/eqn/box.cpp (get_param): Add strictly unnecessary `return
0` statement with lint-style `NOTREACHED` comment to quieten
`-Wreturn-type` warning on GCC 9.5.0, which apparently doesn't do deep
enough control-flow analysis to figure that out for itself.
---
ChangeLog | 8 ++++++++
src/preproc/eqn/box.cpp | 1 +
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index ae4e9b8e7..82f204b41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-04 G. Branden Robinson <[email protected]>
+
+ * src/preproc/eqn/box.cpp (get_param): Add strictly unnecessary
+ `return 0` statement with lint-style `NOTREACHED` comment to
+ quieten `-Wreturn-type` warning on GCC 9.5.0, which apparently
+ doesn't do deep enough control-flow analysis to figure that out
+ for itself.
+
2026-04-03 Johannes Altmanninger <[email protected]>
* src/preproc/eqn/neqn.sh:
diff --git a/src/preproc/eqn/box.cpp b/src/preproc/eqn/box.cpp
index a58762d31..4b37e8d6b 100644
--- a/src/preproc/eqn/box.cpp
+++ b/src/preproc/eqn/box.cpp
@@ -167,6 +167,7 @@ int get_param(const char *name)
return *(param_table[i].ptr);
assert(0 == "attempted to access parameter not in table");
fatal("internal error: unrecognized parameter name '%1'", name);
+ return 0; // NOTREACHED
}
void init_param_table()
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit