Fix 'missing declarations' and 'unusued parameter' warnings
authorOndrej Lehecka <lehecka@fb.com>
Fri, 31 Jul 2015 00:33:21 +0000 (17:33 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Fri, 31 Jul 2015 01:22:04 +0000 (18:22 -0700)
Summary: enum iterators operator!= didn't use the iterator parameter for comparison
because they assumed you only ever compare to end. Change the operator!= to
look at the iterator parameter to check if it was end.

Thrift generated code for reflection initializers for some types that weren't
declared before definition because they were never called outside of the file.
Marked those initializers as 'static'.

Reviewed By: @alandau

Differential Revision: D2284371

folly/IPAddressException.h

index 1ab86efaa2d975e29e84b34dffe47fb93eeee5f3..164d540786b87744d19f304fada5abba2c929034 100644 (file)
@@ -32,7 +32,7 @@ class IPAddressFormatException : public std::exception {
   explicit IPAddressFormatException(const std::string& msg)
       : msg_(msg) {}
   IPAddressFormatException(
-    const IPAddressFormatException& exception_) = default;
+    const IPAddressFormatException&) = default;
   template<typename... Args>
   explicit IPAddressFormatException(Args&&... args)
       : msg_(to<std::string>(std::forward<Args>(args)...)) {}
@@ -51,7 +51,7 @@ class InvalidAddressFamilyException : public IPAddressFormatException {
   explicit InvalidAddressFamilyException(const std::string& msg)
       : IPAddressFormatException(msg) {}
   InvalidAddressFamilyException(
-    const InvalidAddressFamilyException& ex) = default;
+    const InvalidAddressFamilyException&) = default;
   explicit InvalidAddressFamilyException(sa_family_t family)
       : IPAddressFormatException("Address family " +
                                  detail::familyNameStr(family) +