X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FMPMCPipeline.h;h=90a4c85aa25e3cd4f69febb5511704f5f7d95423;hb=b22935cd23251a9958f73242cb1dc44dfc75c5f5;hp=d480c16700cd9ad8e575bd678369f1b7f7349a8a;hpb=0efcd8c8283cdfc57d83594637dcb8b5fec09288;p=folly.git diff --git a/folly/MPMCPipeline.h b/folly/MPMCPipeline.h index d480c167..90a4c85a 100644 --- a/folly/MPMCPipeline.h +++ b/folly/MPMCPipeline.h @@ -1,5 +1,5 @@ /* - * Copyright 2015 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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_++; } @@ -272,13 +275,13 @@ template class MPMCPipeline { * in any queue) are also counted. */ ssize_t sizeGuess() const noexcept { - return (std::get<0>(stages_).writeCount() * kAmplification - - std::get(stages_).readCount()); + return ssize_t( + std::get<0>(stages_).writeCount() * kAmplification - + std::get(stages_).readCount()); } private: StageTuple stages_; }; - -} // namespaces +} // namespace folly