[svn] commit: r3157 - in /branches/trac365/src: bin/auth/ bin/auth/tests/ lib/cc/ lib/cc/tests/ lib/config/tests/ lib/dns/rdata/generic/ lib/dns/tests/ lib/xfr/
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Oct 9 13:22:34 UTC 2010
Author: jinmei
Date: Sat Oct 9 13:22:28 2010
New Revision: 3157
Log:
made minimal level changes to build it with clang++.
need more cleanups
Modified:
branches/trac365/src/bin/auth/Makefile.am
branches/trac365/src/bin/auth/asio_link.h
branches/trac365/src/bin/auth/tests/auth_srv_unittest.cc
branches/trac365/src/lib/cc/Makefile.am
branches/trac365/src/lib/cc/tests/Makefile.am
branches/trac365/src/lib/cc/tests/data_unittests.cc
branches/trac365/src/lib/config/tests/ccsession_unittests.cc
branches/trac365/src/lib/dns/rdata/generic/opt_41.cc
branches/trac365/src/lib/dns/tests/name_unittest.cc
branches/trac365/src/lib/xfr/Makefile.am
Modified: branches/trac365/src/bin/auth/Makefile.am
==============================================================================
--- branches/trac365/src/bin/auth/Makefile.am (original)
+++ branches/trac365/src/bin/auth/Makefile.am Sat Oct 9 13:22:28 2010
@@ -46,6 +46,8 @@
if USE_GXX
libasio_link_a_CXXFLAGS += -Wno-unused-parameter
endif
+libasio_link_a_CXXFLAGS += -Wno-unused-function
+libasio_link_a_CXXFLAGS += -Wno-char-subscripts
libasio_link_a_CPPFLAGS = $(AM_CPPFLAGS)
BUILT_SOURCES = spec_config.h
Modified: branches/trac365/src/bin/auth/asio_link.h
==============================================================================
--- branches/trac365/src/bin/auth/asio_link.h (original)
+++ branches/trac365/src/bin/auth/asio_link.h Sat Oct 9 13:22:28 2010
@@ -88,7 +88,7 @@
/// http://think-async.com/Asio/asio-1.3.1/doc/asio/reference/asio_handler_allocate.html
namespace asio_link {
-struct IOServiceImpl;
+class IOServiceImpl;
/// \brief An exception that is thrown if an error occurs within the IO
/// module. This is mainly intended to be a wrapper exception class for
Modified: branches/trac365/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- branches/trac365/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ branches/trac365/src/bin/auth/tests/auth_srv_unittest.cc Sat Oct 9 13:22:28 2010
@@ -388,8 +388,8 @@
// dropped.
TEST_F(AuthSrvTest, shortMessage) {
createDataFromFile("shortmessage_fromWire");
- EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
- response_renderer));
+ EXPECT_FALSE(server.processMessage(*io_message, parse_message,
+ response_renderer));
}
// Response messages. Must be silently dropped, whether it's a valid response
@@ -397,19 +397,19 @@
TEST_F(AuthSrvTest, response) {
// A valid (although unusual) response
createDataFromFile("simpleresponse_fromWire.wire");
- EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
- response_renderer));
+ EXPECT_FALSE(server.processMessage(*io_message, parse_message,
+ response_renderer));
// A response with a broken question section. must be dropped rather than
// returning FORMERR.
createDataFromFile("shortresponse_fromWire");
- EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
- response_renderer));
+ EXPECT_FALSE(server.processMessage(*io_message, parse_message,
+ response_renderer));
// A response to iquery. must be dropped rather than returning NOTIMP.
createDataFromFile("iqueryresponse_fromWire.wire");
- EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
- response_renderer));
+ EXPECT_FALSE(server.processMessage(*io_message, parse_message,
+ response_renderer));
}
// Query with a broken question
@@ -480,8 +480,8 @@
RRType::AXFR(), IPPROTO_TCP);
// On success, the AXFR query has been passed to a separate process,
// so we shouldn't have to respond.
- EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
- response_renderer));
+ EXPECT_FALSE(server.processMessage(*io_message, parse_message,
+ response_renderer));
EXPECT_FALSE(xfrout.isConnected());
}
Modified: branches/trac365/src/lib/cc/Makefile.am
==============================================================================
--- branches/trac365/src/lib/cc/Makefile.am (original)
+++ branches/trac365/src/lib/cc/Makefile.am Sat Oct 9 13:22:28 2010
@@ -12,6 +12,10 @@
AM_CXXFLAGS += -Wno-unused-parameter
endif
+#for clang++
+AM_CXXFLAGS += -Wno-unused-function
+AM_CXXFLAGS += -Wno-char-subscripts
+
lib_LTLIBRARIES = libcc.la
libcc_la_SOURCES = data.cc data.h session.cc session.h
Modified: branches/trac365/src/lib/cc/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/cc/tests/Makefile.am (original)
+++ branches/trac365/src/lib/cc/tests/Makefile.am Sat Oct 9 13:22:28 2010
@@ -5,6 +5,9 @@
if USE_GXX #XXX: see ../Makefile.am
AM_CXXFLAGS += -Wno-unused-parameter
endif
+#for clang++
+AM_CXXFLAGS += -Wno-unused-function
+AM_CXXFLAGS += -Wno-char-subscripts
if USE_STATIC_LINK
AM_LDFLAGS = -static
Modified: branches/trac365/src/lib/cc/tests/data_unittests.cc
==============================================================================
--- branches/trac365/src/lib/cc/tests/data_unittests.cc (original)
+++ branches/trac365/src/lib/cc/tests/data_unittests.cc Sat Oct 9 13:22:28 2010
@@ -247,7 +247,7 @@
EXPECT_EQ(b, true);
b = false;
EXPECT_TRUE(el->setValue(b));
- EXPECT_EQ(false, el->boolValue());
+ EXPECT_FALSE(el->boolValue());
el = Element::create("foo");
EXPECT_THROW(el->intValue(), TypeError);
Modified: branches/trac365/src/lib/config/tests/ccsession_unittests.cc
==============================================================================
--- branches/trac365/src/lib/config/tests/ccsession_unittests.cc (original)
+++ branches/trac365/src/lib/config/tests/ccsession_unittests.cc Sat Oct 9 13:22:28 2010
@@ -150,7 +150,7 @@
}
TEST_F(CCSessionTest, session1) {
- EXPECT_EQ(false, session.haveSubscription("Spec1", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec1", "*"));
ModuleCCSession mccs(ccspecfile("spec1.spec"), session, NULL, NULL);
EXPECT_EQ(true, session.haveSubscription("Spec1", "*"));
@@ -166,7 +166,7 @@
TEST_F(CCSessionTest, session2)
{
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
ModuleCCSession mccs(ccspecfile("spec2.spec"), session, NULL, NULL);
EXPECT_EQ(true, session.haveSubscription("Spec2", "*"));
@@ -212,7 +212,7 @@
// client will ask for config
session.getMessages()->add(createAnswer(0, el("{}")));
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
ModuleCCSession mccs(ccspecfile("spec2.spec"), session, my_config_handler,
my_command_handler);
EXPECT_EQ(true, session.haveSubscription("Spec2", "*"));
@@ -236,7 +236,7 @@
// client will ask for config
session.getMessages()->add(createAnswer(0, el("{}")));
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
ModuleCCSession mccs(ccspecfile("spec2.spec"), session, my_config_handler,
my_command_handler);
EXPECT_EQ(true, session.haveSubscription("Spec2", "*"));
@@ -347,7 +347,7 @@
// the default
session.getMessages()->add(createAnswer(0, el("{}")));
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
module_name = mccs.addRemoteConfig(ccspecfile("spec2.spec"));
EXPECT_EQ("Spec2", module_name);
EXPECT_EQ(true, session.haveSubscription("Spec2", "*"));
@@ -357,7 +357,7 @@
// Remove it and see we get an error asking for a config value
mccs.removeRemoteConfig(module_name);
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
EXPECT_THROW(mccs.getRemoteConfigValue(module_name, "item1"), CCSessionError);
// Now re-add it, with a specific config value, and see we get that
@@ -388,7 +388,7 @@
// client will ask for config
session.getMessages()->add(createAnswer(0, el("{ }")));
- EXPECT_EQ(false, session.haveSubscription("Spec2", "*"));
+ EXPECT_FALSE(session.haveSubscription("Spec2", "*"));
ModuleCCSession mccs(ccspecfile("spec2.spec"), session, my_config_handler, my_command_handler);
EXPECT_EQ(true, session.haveSubscription("Spec2", "*"));
Modified: branches/trac365/src/lib/dns/rdata/generic/opt_41.cc
==============================================================================
--- branches/trac365/src/lib/dns/rdata/generic/opt_41.cc (original)
+++ branches/trac365/src/lib/dns/rdata/generic/opt_41.cc Sat Oct 9 13:22:28 2010
@@ -72,7 +72,7 @@
OPT::compare(const Rdata& other) const
{
//const OPT& other_opt = dynamic_cast<const OPT&>(other);
- dynamic_cast<const OPT&>(other); // right now we don't need other_opt
+ (void)dynamic_cast<const OPT&>(other); // right now we don't need other_opt
return (0);
}
Modified: branches/trac365/src/lib/dns/tests/name_unittest.cc
==============================================================================
--- branches/trac365/src/lib/dns/tests/name_unittest.cc (original)
+++ branches/trac365/src/lib/dns/tests/name_unittest.cc Sat Oct 9 13:22:28 2010
@@ -443,9 +443,10 @@
}
TEST_F(NameTest, isWildcard) {
- EXPECT_EQ(false, example_name.isWildcard());
+ //EXPECT_EQ(false, example_name.isWildcard());
+ EXPECT_FALSE(example_name.isWildcard());
EXPECT_EQ(true, Name("*.a.example.com").isWildcard());
- EXPECT_EQ(false, Name("a.*.example.com").isWildcard());
+ EXPECT_FALSE(Name("a.*.example.com").isWildcard());
}
TEST_F(NameTest, concatenate) {
Modified: branches/trac365/src/lib/xfr/Makefile.am
==============================================================================
--- branches/trac365/src/lib/xfr/Makefile.am (original)
+++ branches/trac365/src/lib/xfr/Makefile.am Sat Oct 9 13:22:28 2010
@@ -3,6 +3,9 @@
AM_CXXFLAGS = $(B10_CXXFLAGS) -Wno-strict-aliasing
AM_CXXFLAGS += -Wno-unused-parameter # see src/lib/cc/Makefile.am
+#for clang++
+AM_CXXFLAGS += -Wno-unused-function
+AM_CXXFLAGS += -Wno-char-subscripts
CLEANFILES = *.gcno *.gcda
More information about the bind10-changes
mailing list