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:
@ -957,7 +957,7 @@ struct game_drawstate {
|
||||
* subfunction. move_type() returns -1 for an illegal move, 0 for a
|
||||
* movement, and 1 for a push.
|
||||
*/
|
||||
int move_type(const game_state *state, int dx, int dy)
|
||||
static int move_type(const game_state *state, int dx, int dy)
|
||||
{
|
||||
int w = state->p.w, h = state->p.h;
|
||||
int px = state->px, py = state->py;
|
||||
|
Reference in New Issue
Block a user