From f2240b85bcae9a0b18340981fdeda279c74e6d56 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 2 May 2017 14:42:02 +0200 Subject: Fix warnings hidden earlier due to including application headers as system includes --- vbench/src/vbench/core/dispatcher.h | 7 ++++--- vbench/src/vbench/core/dispatcher.hpp | 3 +++ vbench/src/vbench/core/handler_thread.h | 11 +++++------ vbench/src/vbench/core/input_file_reader.cpp | 2 ++ vbench/src/vbench/core/input_file_reader.h | 1 + vbench/src/vbench/core/time_queue.h | 5 ++--- vbench/src/vbench/http/http_client.cpp | 5 +++-- vbench/src/vbench/http/http_client.h | 3 ++- vbench/src/vbench/http/http_connection_pool.cpp | 3 ++- vbench/src/vbench/http/http_connection_pool.h | 8 ++++---- vbench/src/vbench/test/simple_http_result_handler.cpp | 2 ++ vbench/src/vbench/test/simple_http_result_handler.h | 1 + vbench/src/vbench/vbench/vbench.cpp | 2 ++ vbench/src/vbench/vbench/vbench.h | 1 + 14 files changed, 34 insertions(+), 20 deletions(-) (limited to 'vbench') diff --git a/vbench/src/vbench/core/dispatcher.h b/vbench/src/vbench/core/dispatcher.h index 29935ef6baa..4b099c8dd75 100644 --- a/vbench/src/vbench/core/dispatcher.h +++ b/vbench/src/vbench/core/dispatcher.h @@ -36,10 +36,11 @@ private: public: Dispatcher(Handler &fallback); + ~Dispatcher(); bool waitForThreads(size_t threads, size_t pollCnt) const; - virtual void close(); - virtual void handle(std::unique_ptr obj); - virtual std::unique_ptr provide(); + void close() override; + void handle(std::unique_ptr obj) override; + std::unique_ptr provide() override; }; } // namespace vbench diff --git a/vbench/src/vbench/core/dispatcher.hpp b/vbench/src/vbench/core/dispatcher.hpp index b2c14d4ea7a..4f34c678b4e 100644 --- a/vbench/src/vbench/core/dispatcher.hpp +++ b/vbench/src/vbench/core/dispatcher.hpp @@ -13,6 +13,9 @@ Dispatcher::Dispatcher(Handler &fallback) { } +template +Dispatcher::~Dispatcher() {} + template bool Dispatcher::waitForThreads(size_t threads, size_t pollCnt) const diff --git a/vbench/src/vbench/core/handler_thread.h b/vbench/src/vbench/core/handler_thread.h index cd7b53a6109..24753730b11 100644 --- a/vbench/src/vbench/core/handler_thread.h +++ b/vbench/src/vbench/core/handler_thread.h @@ -2,14 +2,13 @@ #pragma once +#include "handler.h" #include #include #include #include #include -#include "handler.h" - namespace vbench { /** @@ -31,13 +30,13 @@ private: vespalib::Thread _thread; bool _done; - virtual void run(); + void run() override; public: HandlerThread(Handler &next); - virtual ~HandlerThread(); - virtual void handle(std::unique_ptr obj); - virtual void join(); + ~HandlerThread(); + void handle(std::unique_ptr obj) override; + void join() override; }; } // namespace vbench diff --git a/vbench/src/vbench/core/input_file_reader.cpp b/vbench/src/vbench/core/input_file_reader.cpp index 48a2b4e564e..dd24c3f9f36 100644 --- a/vbench/src/vbench/core/input_file_reader.cpp +++ b/vbench/src/vbench/core/input_file_reader.cpp @@ -14,6 +14,8 @@ InputFileReader::InputFileReader(const string &name) } } +InputFileReader::~InputFileReader() {} + bool InputFileReader::readLine(string &dst) { diff --git a/vbench/src/vbench/core/input_file_reader.h b/vbench/src/vbench/core/input_file_reader.h index 5883faab9aa..473df3de73b 100644 --- a/vbench/src/vbench/core/input_file_reader.h +++ b/vbench/src/vbench/core/input_file_reader.h @@ -23,6 +23,7 @@ private: public: InputFileReader(const string &name); + ~InputFileReader(); /** * Read a single line from the input file and put it into diff --git a/vbench/src/vbench/core/time_queue.h b/vbench/src/vbench/core/time_queue.h index b7c287dbdc4..7375b70571d 100644 --- a/vbench/src/vbench/core/time_queue.h +++ b/vbench/src/vbench/core/time_queue.h @@ -2,12 +2,11 @@ #pragma once +#include "closeable.h" #include #include #include -#include "closeable.h" - namespace vbench { /** @@ -43,7 +42,7 @@ private: public: TimeQueue(double window, double tick); - virtual void close(); + void close() override; void discard(); void insert(std::unique_ptr obj, double time); bool extract(double time, std::vector > &list, double &delay); diff --git a/vbench/src/vbench/http/http_client.cpp b/vbench/src/vbench/http/http_client.cpp index f2d0ca0a368..f89a4597178 100644 --- a/vbench/src/vbench/http/http_client.cpp +++ b/vbench/src/vbench/http/http_client.cpp @@ -2,14 +2,15 @@ #include "http_client.h" #include "hex_number.h" -#include #include -#include +#include namespace vbench { using OutputWriter = vespalib::OutputWriter; +HttpClient::~HttpClient() {} + void HttpClient::writeRequest() { OutputWriter dst(_conn->stream(), WRITE_SIZE); diff --git a/vbench/src/vbench/http/http_client.h b/vbench/src/vbench/http/http_client.h index 7497d0c8621..076e4ae1770 100644 --- a/vbench/src/vbench/http/http_client.h +++ b/vbench/src/vbench/http/http_client.h @@ -3,10 +3,10 @@ #pragma once -#include #include "http_connection.h" #include "http_connection_pool.h" #include "http_result_handler.h" +#include namespace vbench { @@ -59,6 +59,7 @@ private: bool perform(); public: + ~HttpClient(); static bool fetch(const ServerSpec &server, const string &url, HttpResultHandler &handler) { diff --git a/vbench/src/vbench/http/http_connection_pool.cpp b/vbench/src/vbench/http/http_connection_pool.cpp index 15d4786c7fd..a9ddf306e8a 100644 --- a/vbench/src/vbench/http/http_connection_pool.cpp +++ b/vbench/src/vbench/http/http_connection_pool.cpp @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #include "http_connection_pool.h" namespace vbench { @@ -13,6 +12,8 @@ HttpConnectionPool::HttpConnectionPool(Timer &timer) { } +HttpConnectionPool::~HttpConnectionPool() {} + HttpConnection::UP HttpConnectionPool::getConnection(const ServerSpec &server) { diff --git a/vbench/src/vbench/http/http_connection_pool.h b/vbench/src/vbench/http/http_connection_pool.h index 95a069ef6f1..3a2927c5878 100644 --- a/vbench/src/vbench/http/http_connection_pool.h +++ b/vbench/src/vbench/http/http_connection_pool.h @@ -1,13 +1,12 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include +#include "http_connection.h" +#include #include #include -#include -#include "http_connection.h" +#include namespace vbench { @@ -29,6 +28,7 @@ private: public: HttpConnectionPool(Timer &timer); + ~HttpConnectionPool(); HttpConnection::UP getConnection(const ServerSpec &server); void putConnection(HttpConnection::UP conn); }; diff --git a/vbench/src/vbench/test/simple_http_result_handler.cpp b/vbench/src/vbench/test/simple_http_result_handler.cpp index 64f55dfb3da..8c8289fd859 100644 --- a/vbench/src/vbench/test/simple_http_result_handler.cpp +++ b/vbench/src/vbench/test/simple_http_result_handler.cpp @@ -13,6 +13,8 @@ SimpleHttpResultHandler::SimpleHttpResultHandler() { } +SimpleHttpResultHandler::~SimpleHttpResultHandler() {} + void SimpleHttpResultHandler::handleHeader(const string &name, const string &value) { diff --git a/vbench/src/vbench/test/simple_http_result_handler.h b/vbench/src/vbench/test/simple_http_result_handler.h index a58a4cea8af..227593e2e92 100644 --- a/vbench/src/vbench/test/simple_http_result_handler.h +++ b/vbench/src/vbench/test/simple_http_result_handler.h @@ -19,6 +19,7 @@ private: public: SimpleHttpResultHandler(); + ~SimpleHttpResultHandler(); virtual void handleHeader(const string &name, const string &value) override; virtual void handleContent(const Memory &data) override; virtual void handleFailure(const string &reason) override; diff --git a/vbench/src/vbench/vbench/vbench.cpp b/vbench/src/vbench/vbench/vbench.cpp index 786573ed588..dcc3ecda542 100644 --- a/vbench/src/vbench/vbench/vbench.cpp +++ b/vbench/src/vbench/vbench/vbench.cpp @@ -44,6 +44,8 @@ VBench::VBench(const vespalib::Slime &cfg) } } +VBench::~VBench() {} + void VBench::abort() { diff --git a/vbench/src/vbench/vbench/vbench.h b/vbench/src/vbench/vbench/vbench.h index 186bdeeac17..8fda1635ce8 100644 --- a/vbench/src/vbench/vbench/vbench.h +++ b/vbench/src/vbench/vbench/vbench.h @@ -36,6 +36,7 @@ private: public: VBench(const vespalib::Slime &cfg); + ~VBench(); void abort(); void run() override; const Taint &tainted() const override { return _taint; } -- cgit v1.2.3