Commit 4df19b60 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[master] Merge branch 'trac2705'

parents 7a34e789 56384395
......@@ -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"],
......
......@@ -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) {
......
......@@ -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
......
......@@ -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;
......
......@@ -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");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment