Browse Source

[master] Merge branch 'trac2705'

JINMEI Tatuya 12 years ago
parent
commit
4df19b60af

+ 4 - 2
configure.ac

@@ -161,8 +161,10 @@ if test $with_werror = 1; then
    CXXFLAGS_SAVED="$CXXFLAGS"
    CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
    AC_MSG_CHECKING(for in-TU anonymous namespace breakage)
-   AC_TRY_COMPILE([namespace { class Foo {}; }
-   namespace isc {class Bar {Foo foo_;};} ],,
+   # We use struct, not class, here, because some compilers complain about
+   # "unused private members", causing a false positive.
+   AC_TRY_COMPILE([namespace { struct Foo {}; }
+   namespace isc {struct Bar {Foo foo_;};} ],,
 	[AC_MSG_RESULT(no)
 	 werror_ok=1
 	 B10_CXXFLAGS="$B10_CXXFLAGS -Werror"],

+ 1 - 1
src/lib/asiodns/sync_udp_server.cc

@@ -44,7 +44,7 @@ SyncUDPServer::SyncUDPServer(asio::io_service& io_service, const int fd,
     output_buffer_(new isc::util::OutputBuffer(0)),
     query_(new isc::dns::Message(isc::dns::Message::PARSE)),
     answer_(new isc::dns::Message(isc::dns::Message::RENDER)),
-    io_(io_service), checkin_callback_(checkin), lookup_callback_(lookup),
+    checkin_callback_(checkin), lookup_callback_(lookup),
     answer_callback_(answer), stopped_(false)
 {
     if (af != AF_INET && af != AF_INET6) {

+ 0 - 2
src/lib/asiodns/sync_udp_server.h

@@ -118,8 +118,6 @@ private:
     isc::dns::MessagePtr query_, answer_;
     // The socket used for the communication
     std::auto_ptr<asio::ip::udp::socket> socket_;
-    // The event loop we use
-    asio::io_service& io_;
     // Place the socket puts the sender of a packet when it is received
     asio::ip::udp::endpoint sender_;
     // Callbacks

+ 6 - 3
src/lib/cache/local_zone_data.h

@@ -29,8 +29,12 @@ namespace cache {
 /// in the zone.
 class LocalZoneData {
 public:
-    LocalZoneData(uint16_t rrset_class) : class_(rrset_class)
-    {}
+    /// \brief Constructor.
+    ///
+    /// The passed parameter is expected to be an RR class value, but is not
+    /// currently unused.  And this library will be quite likely to
+    /// deprecated anyway, so we don't touch it heavily.
+    LocalZoneData(uint16_t) {}
 
     /// \brief Look up one rrset.
     ///
@@ -51,7 +55,6 @@ public:
 
 private:
     std::map<std::string, isc::dns::RRsetPtr> rrsets_map_; // RRsets of the zone
-    uint16_t class_; // The class of the zone
 };
 
 typedef boost::shared_ptr<LocalZoneData> LocalZoneDataPtr;

+ 3 - 2
src/lib/dhcpsrv/pool.cc

@@ -102,8 +102,9 @@ Pool6::Pool6(Pool6Type type, const isc::asiolink::IOAddress& prefix,
         isc_throw(BadValue, "Invalid Pool6 address boundaries: not IPv6");
     }
 
-    // check if the prefix length is sane
-    if (prefix_len == 0 || prefix_len > 128) {
+    // check if the prefix length is sane (we use the member variable only
+    // for silencing some compilers; see #2705 and #2789).
+    if (prefix_len_ == 0 || prefix_len_ > 128) {
         isc_throw(BadValue, "Invalid prefix length");
     }