mark as unused some variables with cpp-derived names

Summary: as above

Test Plan:
  Run "make EXTRA_CXXFLAGS='-W -Wextra'" and see fewer errors.

Reviewers: ljin, sdong, igor.sugak, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33753
This commit is contained in:
Jim Meyering 2015-02-19 15:55:06 -08:00
parent c6d54b5037
commit 1b4082581c
2 changed files with 5 additions and 3 deletions

View File

@ -154,7 +154,8 @@ AddBenchmark(const char* file, const char* name, Lambda&& lambda) {
#define FB_CONCATENATE_IMPL(s1, s2) s1##s2
#define FB_CONCATENATE(s1, s2) FB_CONCATENATE_IMPL(s1, s2)
#define FB_ANONYMOUS_VARIABLE(str) FB_CONCATENATE(str, __LINE__)
#define FB_ANONYMOUS_VARIABLE(str) \
FB_CONCATENATE(str, __LINE__ __attribute__((__unused__)))
#define FB_STRINGIZE(x) #x

View File

@ -182,8 +182,9 @@ class TesterHelper {
t._Run(); \
} \
}; \
bool TCONCAT(_Test_ignored_, name) = ::rocksdb::test::RegisterTest( \
#base, #name, &TCONCAT(_Test_, name)::_RunIt); \
bool TCONCAT(_Test_ignored_, name) __attribute__((__unused__)) \
= ::rocksdb::test::RegisterTest(#base, #name, \
&TCONCAT(_Test_, name)::_RunIt); \
void TCONCAT(_Test_, name)::_Run()
// Register the specified test. Typically not used directly, but