THRIFT-2160 Warning in thrift.h when compiling with -Wunused and NDEBUG
authorRoger Meier <roger@apache.org>
Mon, 2 Sep 2013 18:16:49 +0000 (20:16 +0200)
committerRoger Meier <roger@apache.org>
Mon, 2 Sep 2013 18:16:49 +0000 (20:16 +0200)
Patch: Frank Meerkoetter

lib/cpp/src/thrift/Thrift.h

index 7b9a8ad..4d8d87c 100644 (file)
@@ -86,6 +86,7 @@ class TEnumIterator : public std::iterator<std::forward_iterator_tag, std::pair<
   }
 
   bool operator !=(const TEnumIterator& end) {
+    (void)end;  // avoid "unused" warning with NDEBUG
     assert(end.n_ == -1);
     return (ii_ != n_);
   }