folly: fix -Wunused-parameter in opt mode
authorIgor Sugak <sugak@fb.com>
Fri, 29 Jan 2016 23:53:26 +0000 (15:53 -0800)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Sat, 30 Jan 2016 00:20:46 +0000 (16:20 -0800)
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
folly/test/FBStringTest.cpp

index d480c16700cd9ad8e575bd678369f1b7f7349a8a..aa3a646f7c738171de6ad6c2727d06a133dcc5bd 100644 (file)
@@ -161,12 +161,15 @@ template <class In, class... Stages> 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_++;
     }
index 78d6514affabc450b9f75732accd062bfae953a7..fdd8d88f2ed936318ca4e64d5582d68fb0a8f80b 100644 (file)
@@ -591,7 +591,7 @@ template <class String> 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 <class String> void clause11_21_4_7_2_a(String & test) {