gbranden pushed a commit to branch master
in repository groff.
commit 965772e3fc048803eff7a09dbd37b90c59e0581d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Mar 17 08:23:32 2026 -0500
src/roff/troff/input.cpp: Constify immutable data.
* src/roff/troff/input.cpp (struct warning_category): Add (further)
`const` qualification to type and its members. This structure is
immutable for the lifetime of the program.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0da2f0a95..982854267 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-03-17 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (struct warning_category): Add
+ {further} `const` qualification to type and its members. This
+ structure is immutable for the lifetime of the program.
+
2026-03-15 G. Branden Robinson <[email protected]>
* bootstrap.conf (gnulib_modules): Drop `putenv`.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index c1db53c14..2ce7f8c8f 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10608,9 +10608,9 @@ static void read_drawing_command_color_arguments(token
&start)
have_formattable_input = true;
}
-static struct warning_category {
- const char *name;
- unsigned int set;
+static const struct warning_category {
+ const char * const name;
+ const unsigned int set;
} warning_table[] = {
{ "char", WARN_CHAR },
{ "range", WARN_RANGE },
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit