Turn on -Wmissing-prototypes

Summary: Compiling for iOS has by default turned on -Wmissing-prototypes, which causes rocksdb to fail compiling. This diff turns on -Wmissing-prototypes in our compile options and cleans up all functions with missing prototypes.

Test Plan: compiles

Reviewers: dhruba, haobo, ljin, sdong

Reviewed By: ljin

CC: leveldb

Differential Revision: https://reviews.facebook.net/D17649
This commit is contained in:
Igor Canadi
2014-04-09 21:17:14 -07:00
parent df2a8b6a1a
commit 4daea66343
28 changed files with 157 additions and 114 deletions

View File

@@ -107,7 +107,9 @@ class CacheTest {
};
CacheTest* CacheTest::current_;
namespace {
void dumbDeleter(const Slice& key, void* value) { }
} // namespace
TEST(CacheTest, UsageTest) {
// cache is shared_ptr and will be automatically cleaned up.
@@ -382,9 +384,11 @@ class Value {
~Value() { std::cout << v_ << " is destructed\n"; }
};
namespace {
void deleter(const Slice& key, void* value) {
delete (Value *)value;
}
} // namespace
TEST(CacheTest, BadEviction) {
int n = 10;