Commit fa8af3f6 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

made minimal level changes to build it with clang++.

need more cleanups


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac365@3157 e5f2f494-b856-4b98-b285-d166d9295462
parent 83981df1
......@@ -46,6 +46,8 @@ libasio_link_a_CXXFLAGS = $(AM_CXXFLAGS)
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
......
......@@ -88,7 +88,7 @@ class AuthSrv;
/// 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
......
......@@ -388,8 +388,8 @@ TEST_F(AuthSrvTest, multiQuestion) {
// 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, shortMessage) {
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 @@ TEST_F(AuthSrvTest, AXFRSuccess) {
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());
}
......
......@@ -12,6 +12,10 @@ if USE_GXX
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
......
......@@ -5,6 +5,9 @@ AM_CXXFLAGS = $(B10_CXXFLAGS)
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
......
......@@ -247,7 +247,7 @@ TEST(Element, create_and_value_throws) {
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);
......
......@@ -150,7 +150,7 @@ TEST_F(CCSessionTest, parseCommand) {
}
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, session1) {
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 @@ TEST_F(CCSessionTest, session3) {
// 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 @@ TEST_F(CCSessionTest, checkCommand) {
// 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 @@ TEST_F(CCSessionTest, remoteConfig) {
// 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 @@ TEST_F(CCSessionTest, remoteConfig) {
// 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 @@ TEST_F(CCSessionTest, ignoreRemoteConfigCommands) {
// 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", "*"));
......
......@@ -72,7 +72,7 @@ int
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);
}
......
......@@ -443,9 +443,10 @@ TEST_F(NameTest, equal) {
}
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) {
......
......@@ -3,6 +3,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
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
......
Markdown is supported
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