From: Ben Harris Date: Tue, 3 Dec 2024 13:58:25 +0000 (+0000) Subject: Add some warning flags to the C compiler X-Git-Tag: bedstead-3.251~80 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=f921f1ec6f8fc228a815436625a11f4bcb713e32;p=bedstead.git Add some warning flags to the C compiler I've chosen ones under which bedstead.c is currently clean, at least using the versions of GCC and Clang currently in Debian stable. --- diff --git a/Makefile b/Makefile index 6408b23..fb38014 100644 --- 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