From: Jelte Jansen Date: Fri, 11 May 2012 14:30:15 +0000 (+0200) Subject: [master] fix return value for strict compiler checks X-Git-Tag: trac2351_base~226^2~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82cf8a980ba6ec9f7df3fc80703bb5988640cd99;p=thirdparty%2Fkea.git [master] fix return value for strict compiler checks also fixed a trivial typo in a unit test --- diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc index e0af93fd4d..8e834cb747 100644 --- a/src/lib/datasrc/memory_datasrc.cc +++ b/src/lib/datasrc/memory_datasrc.cc @@ -267,6 +267,9 @@ ZoneData::getClosestNSEC(RBTreeNodeChain& node_path, // This must be impossible and should be an internal bug. // See the description at the method declaration. assert(false); + // Even though there is an assert here, strict compilers + // will still need some return value. + return (ConstRBNodeRRsetPtr()); } /// Maintain intermediate data specific to the search context used in diff --git a/src/lib/datasrc/tests/memory_datasrc_unittest.cc b/src/lib/datasrc/tests/memory_datasrc_unittest.cc index b3e76016e7..4fc35e1ecf 100644 --- a/src/lib/datasrc/tests/memory_datasrc_unittest.cc +++ b/src/lib/datasrc/tests/memory_datasrc_unittest.cc @@ -1074,7 +1074,7 @@ TEST_F(InMemoryZoneFinderTest, find) { findCheck(); } -TEST_F(InMemoryZoneFinderTest, findNSEC3Signe) { +TEST_F(InMemoryZoneFinderTest, findNSEC3Signed) { findCheck(ZoneFinder::RESULT_NSEC3_SIGNED); }