diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-11-21 11:21:02 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-11-28 15:22:27 +0100 |
commit | 681c58cf62a2c0d21b52b2405744398fb90c1e7a (patch) | |
tree | 95480633dfddca1e952bcc62125b1eda37dd3b6e /CMakeLists.txt | |
parent | b2af13f291c0971c9953fd6fc2f633ac25d6b13b (diff) | |
download | libgit2-681c58cf62a2c0d21b52b2405744398fb90c1e7a.tar.gz |
cmake: enable warnings for unused functions
Ever since commit 823c0e9cc (Fix broken logic for attr cache invalidation,
2014-04-17), we have completely disabled warnings for unused functions. The only
comment that was added back then is about "annoying extra warnings" from Clang,
but in fact we shouldn't just ignore warnings about functions which aren't used
at all. Instead, the right thing would be to either only conditionally compile
functions that aren't used in all configurations or, alternatively, to remove
functions that aren't required at all.
As remaining instances of unused functions have been removed in the last two
commits, re-enable the warning.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b8aa16334..4537f02bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,7 @@ ELSE () ENABLE_WARNINGS(declaration-after-statement) ENABLE_WARNINGS(shift-count-overflow) DISABLE_WARNINGS(unused-const-variable) - DISABLE_WARNINGS(unused-function) + ENABLE_WARNINGS(unused-function) ENABLE_WARNINGS(format) ENABLE_WARNINGS(format-security) ENABLE_WARNINGS(int-conversion) |