From: Igor Sugak Date: Fri, 29 Jan 2016 23:53:26 +0000 (-0800) Subject: folly: fix -Wunused-parameter in opt mode X-Git-Tag: deprecate-dynamic-initializer~118 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=259d9a885005588133bd5a645a5a9c78446166f1;p=folly.git 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 --- 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) {