Mark many more function (and some objects) static

I noticed commit db3b531e2cab765a00475054d2e9046c9d0437d3 in the history
where Simon added a bunch of "static" qualifiers.  That suggested that
consistently marking internal functions "static" is desirable, so I
tried a build using GCC's -Wmissing-declarations, which requires prior
declaration (presumed to be in a header file) of all global functions.

This commit makes the GTK build clean under GCC's
-Wmissing-declarations.  I've also adding "static" to a few obviously
internal objects, but GCC doesn't complain about those so I certainly
haven't got them all.
This commit is contained in:
Ben Harris
2023-02-16 21:21:15 +00:00
parent a7e738aceb
commit 0186d78da9
12 changed files with 113 additions and 109 deletions

View File

@ -1352,7 +1352,7 @@ static void gen(int order, random_state *rs, int debug)
sfree(sq);
}
void test_soak(int order, random_state *rs)
static void test_soak(int order, random_state *rs)
{
digit *sq;
int n = 0;
@ -1375,7 +1375,7 @@ void test_soak(int order, random_state *rs)
}
}
void usage_exit(const char *msg)
static void usage_exit(const char *msg)
{
if (msg)
fprintf(stderr, "%s: %s\n", quis, msg);