Commit 10e490c1 authored by Giuseppe Ottaviano's avatar Giuseppe Ottaviano Committed by Facebook Github Bot

Tag unused static bools in macros with FOLLY_MAYBE_UNUSED

Reviewed By: yfeldblum, luciang

Differential Revision: D16164723

fbshipit-source-id: ed0c4b2dddb09c8d97a8aca9379e4ea9b107a92c
parent f18d8adb
...@@ -372,23 +372,23 @@ void printResultComparison( ...@@ -372,23 +372,23 @@ void printResultComparison(
* friends below. * friends below.
*/ */
#define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ #define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \
static void funName(paramType); \ static void funName(paramType); \
static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \
(::folly::addBenchmark( \ (::folly::addBenchmark( \
__FILE__, \ __FILE__, \
stringName, \ stringName, \
[](paramType paramName) -> unsigned { \ [](paramType paramName) -> unsigned { \
funName(paramName); \ funName(paramName); \
return rv; \ return rv; \
}), \ }), \
true); \ true); \
static void funName(paramType paramName) static void funName(paramType paramName)
#define BENCHMARK_IMPL_COUNTERS( \ #define BENCHMARK_IMPL_COUNTERS( \
funName, stringName, counters, rv, paramType, paramName) \ funName, stringName, counters, rv, paramType, paramName) \
static void funName(UserCounters& FOLLY_PP_DETAIL_APPEND_VA_ARG(paramType)); \ static void funName(UserCounters& FOLLY_PP_DETAIL_APPEND_VA_ARG(paramType)); \
static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \
(::folly::addBenchmark( \ (::folly::addBenchmark( \
__FILE__, \ __FILE__, \
stringName, \ stringName, \
...@@ -406,14 +406,14 @@ void printResultComparison( ...@@ -406,14 +406,14 @@ void printResultComparison(
* number of iterations. Used internally, see BENCHMARK_MULTI and friends * number of iterations. Used internally, see BENCHMARK_MULTI and friends
* below. * below.
*/ */
#define BENCHMARK_MULTI_IMPL(funName, stringName, paramType, paramName) \ #define BENCHMARK_MULTI_IMPL(funName, stringName, paramType, paramName) \
static unsigned funName(paramType); \ static unsigned funName(paramType); \
static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \
(::folly::addBenchmark( \ (::folly::addBenchmark( \
__FILE__, \ __FILE__, \
stringName, \ stringName, \
[](paramType paramName) { return funName(paramName); }), \ [](paramType paramName) { return funName(paramName); }), \
true); \ true); \
static unsigned funName(paramType paramName) static unsigned funName(paramType paramName)
/** /**
...@@ -657,9 +657,9 @@ void printResultComparison( ...@@ -657,9 +657,9 @@ void printResultComparison(
/** /**
* Draws a line of dashes. * Draws a line of dashes.
*/ */
#define BENCHMARK_DRAW_LINE() \ #define BENCHMARK_DRAW_LINE() \
static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \
(::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ (::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \
true) true)
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment