simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Feb 18 00:13:41 GMT 2023
TL;DR:
a7e738a Call deallocate() in matching.c test routines
0186d78 Mark many more function (and some objects) static
3a3e491 Enable -Wmissing-declarations in STRICT mode on GCC
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2023-02-18 00:13:41
commit a7e738aceb36e4a70d41cf09a74b2d7a3af6cbe0
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=a7e738aceb36e4a70d41cf09a74b2d7a3af6cbe0;hp=1717d5b685828ce3ab22a82d073022ce69de6bcf
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Thu Feb 16 21:17:09 2023 +0000
Call deallocate() in matching.c test routines
This is mostly so that the function is used at all, but I've also
removed another memory leak from --autotest mode to make it apparently
leak-free. The testing from standard input mode has more leaks than I
want to fix.
matching.c | 3 +++
1 file changed, 3 insertions(+)
commit 0186d78da9e83103eb80b3814d4de8031f29232f
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=0186d78da9e83103eb80b3814d4de8031f29232f;hp=a7e738aceb36e4a70d41cf09a74b2d7a3af6cbe0
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Thu Feb 16 21:21:15 2023 +0000
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.
dominosa.c | 2 +-
gtk.c | 106 ++++++++++++++++++++++++++------------------------
latin.c | 4 +-
magnets.c | 4 +-
matching.c | 26 ++++++-------
penrose.c | 4 +-
signpost.c | 2 +-
sort.c | 4 +-
tree234.c | 36 ++++++++---------
unfinished/numgame.c | 16 ++++----
unfinished/separate.c | 16 ++++----
unfinished/sokoban.c | 2 +-
12 files changed, 113 insertions(+), 109 deletions(-)
commit 3a3e491a8bc624eb1c3b34e54ebee8d33942add2
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=3a3e491a8bc624eb1c3b34e54ebee8d33942add2;hp=0186d78da9e83103eb80b3814d4de8031f29232f
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Thu Feb 16 21:31:47 2023 +0000
Enable -Wmissing-declarations in STRICT mode on GCC
Clang's -Wmissing-declarations means something quite different, so we
only enable it on GCC. This is slightly silly since Clang's
-Wmissing-declarations is enabled by default, but it makes it clear that
we know they're different.
cmake/platforms/unix.cmake | 5 +++++
1 file changed, 5 insertions(+)
More information about the tartarus-commits
mailing list