diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-07-27 19:05:00 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-07-27 19:05:00 -0400 |
commit | c43d54826fd92017b9d7d49a5f660d98c0393e02 (patch) | |
tree | 7a04f1d78bec610a3c06fe0ca418df10b53bec48 /build | |
parent | 3552b793e3b30f2bba0e77fbda45a86575f4dae6 (diff) | |
download | bfs-c43d54826fd92017b9d7d49a5f660d98c0393e02.tar.xz |
build/flags: Add -Wmissing-variable-declarations if supported
Diffstat (limited to 'build')
-rw-r--r-- | build/flags.mk | 3 | ||||
-rw-r--r-- | build/flags/missing-var-decls.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/build/flags.mk b/build/flags.mk index 95d5673..5c28c3f 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -105,7 +105,8 @@ include build/exports.mk # Conditionally-supported flags AUTO_FLAGS := \ - gen/flags/deps.mk + gen/flags/deps.mk \ + gen/flags/missing-var-decls.mk gen/flags.mk: ${AUTO_FLAGS} ${MSG} "[ GEN] $@" diff --git a/build/flags/missing-var-decls.c b/build/flags/missing-var-decls.c new file mode 100644 index 0000000..5c20cc6 --- /dev/null +++ b/build/flags/missing-var-decls.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes <tavianator@tavianator.com> +// SPDX-License-Identifier: 0BSD + +/// _CFLAGS += -Wmissing-variable-declarations +/// -Werror + +int main(void) { + return 0; +} |