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
...@@ -374,7 +374,7 @@ void printResultComparison( ...@@ -374,7 +374,7 @@ void printResultComparison(
#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, \
...@@ -388,7 +388,7 @@ void printResultComparison( ...@@ -388,7 +388,7 @@ void printResultComparison(
#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, \
...@@ -408,7 +408,7 @@ void printResultComparison( ...@@ -408,7 +408,7 @@ void printResultComparison(
*/ */
#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, \
...@@ -658,7 +658,7 @@ void printResultComparison( ...@@ -658,7 +658,7 @@ 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