chiark / gitweb /
Add some warning flags to the C compiler
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 3 Dec 2024 13:58:25 +0000 (13:58 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 3 Dec 2024 13:58:25 +0000 (13:58 +0000)
I've chosen ones under which bedstead.c is currently clean, at least
using the versions of GCC and Clang currently in Debian stable.

Makefile

index 6408b23a5871ed5218b3ff0e26d9fba0065a4ccd..fb38014ca7bc4622f79943f389663ff063d2d22b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,14 @@ experimental: bedstead-chiseltip.otf bedstead-plotter-thin.otf \
  bedstead-plotter-light.otf bedstead-plotter-medium.otf \
  bedstead-plotter-bold.otf plotter.png
 
+# CWARNFLAGS contains a set of GCC/Clang warning flags under which
+# bedstead.c is clean.  The "glyphs" array makes heavy use of the
+# shortcuts disapproved by -Wmissing-field-initializers and
+# -Wmissing-braces, so those are disabled.
+CWARNFLAGS ?= -Wall -Wextra \
+       -Wno-missing-field-initializers -Wno-missing-braces
+CFLAGS += $(CWARNFLAGS)
+
 bedstead.ttx: bedstead
        ./bedstead > bedstead.ttx