gbranden pushed a commit to branch master
in repository groff.
commit f5b5c3d5a236fa47e7bf9ee81c7084a001c9e330
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 31 06:16:15 2026 -0500
[grn]: Fix -Wmissing-declarations warning. (2/2)
* src/preproc/grn/hdb.cpp (DBCreateElt):
* src/preproc/grn/hgraph.cpp (line, change):
* src/preproc/grn/main.cpp (usage, add_file, initpic): Define functions
as `static`; external linkage is not required.
---
ChangeLog | 4 ++++
src/preproc/grn/hdb.cpp | 2 +-
src/preproc/grn/hgraph.cpp | 4 ++--
src/preproc/grn/main.cpp | 6 +++---
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af5b0914d..14551b6b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,10 @@
functions as `static`; external linkage is not required.
(main): Drop now unnecessary function-local declaration of
`operand()`.
+ * src/preproc/grn/hdb.cpp (DBCreateElt):
+ * src/preproc/grn/hgraph.cpp (line, change):
+ * src/preproc/grn/main.cpp (usage, add_file, initpic): Define
+ functions as `static`; external linkage is not required.
Fixes `-Wmissing-declarations` GCC warning.
diff --git a/src/preproc/grn/hdb.cpp b/src/preproc/grn/hdb.cpp
index 708389de4..44d7f5d95 100644
--- a/src/preproc/grn/hdb.cpp
+++ b/src/preproc/grn/hdb.cpp
@@ -59,7 +59,7 @@ DBInit()
* This routine creates a new element with the specified attributes and
* links it into database.
*/
-ELT *
+static ELT *
DBCreateElt(int type,
POINT * pointlist,
int brush,
diff --git a/src/preproc/grn/hgraph.cpp b/src/preproc/grn/hgraph.cpp
index 9bf3d547a..4365e200f 100644
--- a/src/preproc/grn/hgraph.cpp
+++ b/src/preproc/grn/hgraph.cpp
@@ -537,7 +537,7 @@ cr()
| Results: Draws a single solid line to (x,y).
*--------------------------------------------------------------------*/
-void
+static void
line(int px,
int py)
{
@@ -953,7 +953,7 @@ NaturalEndSpline(double h[], /* parameterization */
| is set (which means we're leaving a visible area).
*--------------------------------------------------------------------*/
-void
+static void
change(int x,
int y,
int vis)
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp
index 464cf8129..9f0605138 100644
--- a/src/preproc/grn/main.cpp
+++ b/src/preproc/grn/main.cpp
@@ -265,7 +265,7 @@ grnmalloc(size_t size,
return ptr;
}
-void
+static void
usage(FILE *stream)
{
fprintf(stream,
@@ -282,7 +282,7 @@ usage(FILE *stream)
/* Add a new file entry in the array, expanding array if needs be. */
-char **
+static char **
add_file(char **file,
char *new_file,
int *count,
@@ -498,7 +498,7 @@ doinput(FILE *fp)
| troff to begin the picture.
*--------------------------------------------------------------------*/
-void
+static void
initpic()
{
int i;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit