Skip to content

Commit 4a6ef5a

Browse files
committed
cmake: move missing-declarations warning to top-level
We should enforce declarations throughout the code-base, including examples, fuzzers and tests, not just in the `src` tree.
1 parent 8d2b311 commit 4a6ef5a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

cmake/DefaultCFlags.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ else()
125125
enable_warnings(documentation)
126126
disable_warnings(documentation-deprecated-sync)
127127
disable_warnings(missing-field-initializers)
128+
enable_warnings(missing-declarations)
128129
enable_warnings(strict-aliasing)
129130
enable_warnings(strict-prototypes)
130131
enable_warnings(declaration-after-statement)

src/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ set(LIBGIT2_INCLUDES
4141
set(LIBGIT2_SYSTEM_INCLUDES "")
4242
set(LIBGIT2_LIBS "")
4343

44-
enable_warnings(missing-declarations)
45-
4644
if(HAVE_FUTIMENS)
4745
set(GIT_USE_FUTIMENS 1)
4846
endif ()

0 commit comments

Comments
 (0)