diff --git a/util/benchharness.h b/util/benchharness.h index 948fdf2ff..b416f31db 100644 --- a/util/benchharness.h +++ b/util/benchharness.h @@ -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 diff --git a/util/testharness.h b/util/testharness.h index 6527a49e8..488c5cf03 100644 --- a/util/testharness.h +++ b/util/testharness.h @@ -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