summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/benchmarks
diff options
context:
space:
mode:
authorJINMEI Tatuya <jinmei@isc.org>2012-08-31 01:58:34 +0200
committerJINMEI Tatuya <jinmei@isc.org>2012-08-31 01:58:34 +0200
commite8ec4c911eb69b969df42a60fb28d5f727b8a937 (patch)
tree60266d6ca3651ceb4d4f313380385dc7bfb09afb /src/lib/dns/benchmarks
parent[2098] silence cppcheck warnings (diff)
downloadkea-e8ec4c911eb69b969df42a60fb28d5f727b8a937.tar.xz
kea-e8ec4c911eb69b969df42a60fb28d5f727b8a937.zip
[2098] make sure unexpected method call doesn't happen by exception/assert
Diffstat (limited to 'src/lib/dns/benchmarks')
-rw-r--r--src/lib/dns/benchmarks/message_renderer_bench.cc6
-rw-r--r--src/lib/dns/benchmarks/oldmessagerenderer.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/dns/benchmarks/message_renderer_bench.cc b/src/lib/dns/benchmarks/message_renderer_bench.cc
index 752b1f664c..6376498087 100644
--- a/src/lib/dns/benchmarks/message_renderer_bench.cc
+++ b/src/lib/dns/benchmarks/message_renderer_bench.cc
@@ -116,7 +116,11 @@ public:
virtual void writeName(const Name& name, const bool = false) {
name.toWire(getBuffer());
}
- virtual void writeName(const LabelSequence&, const bool) {} // unused
+ virtual void writeName(const LabelSequence&, const bool) {
+ // We shouldn't use this version of writeName (and we internally
+ // control it, so we simply assert it here)
+ assert(false);
+ }
};
void
diff --git a/src/lib/dns/benchmarks/oldmessagerenderer.cc b/src/lib/dns/benchmarks/oldmessagerenderer.cc
index a6c7990115..ed575a083f 100644
--- a/src/lib/dns/benchmarks/oldmessagerenderer.cc
+++ b/src/lib/dns/benchmarks/oldmessagerenderer.cc
@@ -277,7 +277,9 @@ OldMessageRenderer::writeName(const Name& name, const bool compress) {
void
OldMessageRenderer::writeName(const LabelSequence&, const bool) {
- // we don't use this mode for the benchmark
+ // We shouldn't use this version of writeName (and we internally
+ // control it, so we simply assert it here)
+ assert(false);
}
}