Skip to content

Commit

Permalink
build: Add -Wmissing-variable-declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
tavianator committed Jun 8, 2024
1 parent eba6367 commit 7cddd64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/flags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ CFLAGS ?= \
-Werror=implicit \
-Wimplicit-fallthrough \
-Wmissing-declarations \
-Wmissing-variable-declarations \
-Wshadow \
-Wsign-compare \
-Wstrict-prototypes
Expand Down
4 changes: 2 additions & 2 deletions tests/trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string.h>

const char *keys[] = {
static const char *keys[] = {
"foo",
"bar",
"baz",
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7cddd64

Please sign in to comment.