From 78df5d55bc32a2dbd94b259f1c843b259e745c47 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 7 Apr 2010 19:59:20 +0000 Subject: Fix compiler warnings "virtual function but no virtual destructor". git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931660 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/Statistics.cpp | 4 ++++ cpp/src/tests/Statistics.h | 3 +++ cpp/src/tests/qpid_send.cpp | 1 + 3 files changed, 8 insertions(+) (limited to 'cpp') diff --git a/cpp/src/tests/Statistics.cpp b/cpp/src/tests/Statistics.cpp index 24fac8d100..09286e3298 100644 --- a/cpp/src/tests/Statistics.cpp +++ b/cpp/src/tests/Statistics.cpp @@ -25,6 +25,8 @@ namespace qpid { namespace tests { +Statistic::~Statistic() {} + Throughput::Throughput() : messages(0), started(false) {} void Throughput::message(const messaging::Message&) { @@ -82,6 +84,8 @@ void ThroughputAndLatency::report(std::ostream& o) const { ReporterBase::ReporterBase(std::ostream& o, int batch) : wantBatch(batch), batchCount(0), headerPrinted(false), out(o) {} +ReporterBase::~ReporterBase() {} + /** Count message in the statistics */ void ReporterBase::message(const messaging::Message& m) { if (!overall.get()) overall = create(); diff --git a/cpp/src/tests/Statistics.h b/cpp/src/tests/Statistics.h index 5c5b21c49c..def37b7424 100644 --- a/cpp/src/tests/Statistics.h +++ b/cpp/src/tests/Statistics.h @@ -38,6 +38,7 @@ namespace tests { class Statistic { public: + virtual ~Statistic(); virtual void message(const messaging::Message&) = 0; virtual void report(std::ostream&) const = 0; virtual void header(std::ostream&) const = 0; @@ -72,6 +73,8 @@ class ThroughputAndLatency : public Throughput { /** Report batch and overall statistics */ class ReporterBase { public: + virtual ~ReporterBase(); + /** Count message in the statistics */ void message(const messaging::Message& m); diff --git a/cpp/src/tests/qpid_send.cpp b/cpp/src/tests/qpid_send.cpp index 1e9711d206..a4a224caa8 100644 --- a/cpp/src/tests/qpid_send.cpp +++ b/cpp/src/tests/qpid_send.cpp @@ -190,6 +190,7 @@ using namespace qpid::tests; class ContentGenerator { public: + virtual ~ContentGenerator() {} virtual bool getContent(std::string& content) = 0; }; -- cgit v1.2.1