From 259d9a885005588133bd5a645a5a9c78446166f1 Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Fri, 29 Jan 2016 15:53:26 -0800 Subject: [PATCH] folly: fix -Wunused-parameter in opt mode Summary: Fix a few remaining unused parameters, that are exposed only in opt build. Reviewed By: markisaa Differential Revision: D2878865 fb-gh-sync-id: d0d9761362220973cda14d99ab7342fbe8b1a469 --- folly/MPMCPipeline.h | 3 +++ folly/test/FBStringTest.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/folly/MPMCPipeline.h b/folly/MPMCPipeline.h index d480c167..aa3a646f 100644 --- a/folly/MPMCPipeline.h +++ b/folly/MPMCPipeline.h @@ -161,12 +161,15 @@ template class MPMCPipeline { #endif remainingUses_(amplification), value_(value * amplification) { + (void)owner; // -Wunused-parameter } uint64_t use(MPMCPipeline* owner) { CHECK_GT(remainingUses_--, 0); #ifndef NDEBUG CHECK(owner == owner_); +#else + (void)owner; // -Wunused-parameter #endif return value_++; } diff --git a/folly/test/FBStringTest.cpp b/folly/test/FBStringTest.cpp index 78d6514a..fdd8d88f 100644 --- a/folly/test/FBStringTest.cpp +++ b/folly/test/FBStringTest.cpp @@ -591,7 +591,7 @@ template void clause11_21_4_7_1(String & test) { // exercise get_allocator() String s; randomString(&s, maxString); - assert(test.get_allocator() == s.get_allocator()); + DCHECK(test.get_allocator() == s.get_allocator()); } template void clause11_21_4_7_2_a(String & test) { -- 2.34.1