gbranden pushed a commit to branch master
in repository groff.
commit c68b76d555bbf3ad01138fadd4c7c948bda08347
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 14 18:16:32 2026 -0500
[pre-grohtml]: Fix code style nit.
* src/preproc/html/pre-html.cpp (html_system, make_string, min, max)
(addArg, addRegDef, print_args):
* src/preproc/html/pushback.cpp (localexit): Declare `static`; external
linkage is not required. Fixes `-Wmissing-declarations` GCC warning.
---
ChangeLog | 8 ++++++++
src/preproc/html/pre-html.cpp | 14 +++++++-------
src/preproc/html/pushback.cpp | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8564b3cdd..cb32f18de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-05-14 G. Branden Robinson <[email protected]>
+
+ * src/preproc/html/pre-html.cpp (html_system, make_string)
+ (min, max, addArg, addRegDef, print_args):
+ * src/preproc/html/pushback.cpp (localexit):
+ Declare `static`; external linkage is not required. Fixes
+ `-Wmissing-declarations` GCC warning.
+
2026-05-11 G. Branden Robinson <[email protected]>
* src/devices/grohtml/html-text.cpp: Slightly refactor. Use
diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index a8a50cfd8..5afcab0da 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -402,7 +402,7 @@ static char *get_image_generator(void)
* html_system - A wrapper for system().
*/
-void html_system(const char *s, int redirect_stdout)
+static void html_system(const char *s, int redirect_stdout)
{
if (debugging) {
fprintf(stderr, "%s: debug: executing: ", program_name);
@@ -449,7 +449,7 @@ void html_system(const char *s, int redirect_stdout)
* failure as invariably fatal.
*/
-const char *make_string(const char *fmt, ...)
+static const char *make_string(const char *fmt, ...)
{
size_t size = 0;
char *p = 0 /* nullptr */;
@@ -990,7 +990,7 @@ int imageList::createPage(int pageno)
* min - Return the minimum of two numbers.
*/
-int min(int x, int y)
+static int min(int x, int y)
{
if (x < y)
return x;
@@ -1002,7 +1002,7 @@ int min(int x, int y)
* max - Return the maximum of two numbers.
*/
-int max(int x, int y)
+static int max(int x, int y)
{
if (x > y)
return x;
@@ -1254,7 +1254,7 @@ static void alterDeviceTo(int argc, char *argv[], int
toImage)
* addArg - Append newarg onto the command list for groff.
*/
-char **addArg(int argc, char *argv[], char *newarg)
+static char **addArg(int argc, char *argv[], char *newarg)
{
char **new_argv = (char **)malloc((argc + 2) * sizeof(char *));
int i = 0;
@@ -1281,7 +1281,7 @@ char **addArg(int argc, char *argv[], char *newarg)
* list for troff.
*/
-char **addRegDef(int argc, char *argv[], const char *numReg)
+static char **addRegDef(int argc, char *argv[], const char *numReg)
{
char **new_argv = (char **)malloc((argc + 2) * sizeof(char *));
int i = 0;
@@ -1317,7 +1317,7 @@ void dump_args(int argc, char *argv[])
* print_args - Print arguments as if issued on the command line.
*/
-void print_args(int argc, char *argv[])
+static void print_args(int argc, char *argv[])
{
if (debugging) {
fprintf(stderr, "%s: debug: executing: ", program_name);
diff --git a/src/preproc/html/pushback.cpp b/src/preproc/html/pushback.cpp
index f1c3ce93f..69b90001c 100644
--- a/src/preproc/html/pushback.cpp
+++ b/src/preproc/html/pushback.cpp
@@ -97,7 +97,7 @@ pushBackBuffer::~pushBackBuffer ()
* localexit - wraps exit with a return code to aid the ERROR macro.
*/
-int localexit (int i)
+static int localexit (int i)
{
exit(i);
return( 1 );
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit