mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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:
@ -512,7 +512,7 @@ void penrose_calculate_size(int which, int tilesize, int w, int h,
|
||||
int show_recursion = 0;
|
||||
int ntiles, nfinal;
|
||||
|
||||
int test_cb(penrose_state *state, vector *vs, int n, int depth)
|
||||
static int test_cb(penrose_state *state, vector *vs, int n, int depth)
|
||||
{
|
||||
int i, xoff = 0, yoff = 0;
|
||||
double l = penrose_side_length(state->start_size, depth);
|
||||
@ -542,7 +542,7 @@ int test_cb(penrose_state *state, vector *vs, int n, int depth)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usage_exit(void)
|
||||
static void usage_exit(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: penrose-test [--recursion] P2|P3 SIZE DEPTH\n");
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user