diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-06-08 12:38:27 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-06-08 12:38:27 -0400 |
commit | 7cddd64b3131812b82feffe2deb311bf6ab9a262 (patch) | |
tree | 103b8f626164ee12b599a09fa91544ad2eb126dd | |
parent | eba6367a13d67fc148a8c78680f73d48b86a5dba (diff) | |
download | bfs-7cddd64b3131812b82feffe2deb311bf6ab9a262.tar.xz |
build: Add -Wmissing-variable-declarations
-rw-r--r-- | build/flags.mk | 1 | ||||
-rw-r--r-- | tests/trie.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/build/flags.mk b/build/flags.mk index c50b077..e0d67d5 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -90,6 +90,7 @@ CFLAGS ?= \ -Werror=implicit \ -Wimplicit-fallthrough \ -Wmissing-declarations \ + -Wmissing-variable-declarations \ -Wshadow \ -Wsign-compare \ -Wstrict-prototypes diff --git a/tests/trie.c b/tests/trie.c index 4667322..ebaae5d 100644 --- a/tests/trie.c +++ b/tests/trie.c @@ -8,7 +8,7 @@ #include <stdlib.h> #include <string.h> -const char *keys[] = { +static const char *keys[] = { "foo", "bar", "baz", @@ -37,7 +37,7 @@ const char *keys[] = { ">>>", }; -const size_t nkeys = countof(keys); +static const size_t nkeys = countof(keys); bool check_trie(void) { bool ret = true; |