From 7f5cb607af73a4134a158a14006bdc3e202d0a34 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 6 Apr 2017 11:39:35 -0400 Subject: Fix some more compiler warnings --- include/config.h | 2 +- include/defs.h | 1 - include/modes.h | 2 ++ include/serialize.h | 2 +- modules/sqlite.cpp | 6 +++--- src/logger.cpp | 4 ++++ 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/config.h b/include/config.h index b6b36b726..25c8f6166 100644 --- a/include/config.h +++ b/include/config.h @@ -26,7 +26,7 @@ namespace Configuration { class CoreExport Block { - friend struct Conf; + friend class Conf; public: typedef Anope::map item_map; diff --git a/include/defs.h b/include/defs.h index 989ce3e5b..bd4f2871e 100644 --- a/include/defs.h +++ b/include/defs.h @@ -33,7 +33,6 @@ struct ChanUserContainer; class ClientSocket; class Command; class CommandSource; -namespace Configuration { struct Conf; } class ConnectionSocket; class Entry; class ExtensibleBase; diff --git a/include/modes.h b/include/modes.h index 706b0b716..49e923cda 100644 --- a/include/modes.h +++ b/include/modes.h @@ -23,6 +23,8 @@ #include "anope.h" #include "base.h" +namespace Configuration { class Conf; } + /** The different types of modes */ enum ModeType diff --git a/include/serialize.h b/include/serialize.h index 8137e18e9..497e28866 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -718,7 +718,7 @@ class Serialize::ObjectField : public CommonFieldBase this->is_object = true; } - T GetField(TypeImpl *s) + T GetField(TypeImpl *s) override { T *t = this->Get_(s); diff --git a/modules/sqlite.cpp b/modules/sqlite.cpp index 95af6e39a..41123adb3 100644 --- a/modules/sqlite.cpp +++ b/modules/sqlite.cpp @@ -86,7 +86,7 @@ class SQLiteService : public Provider void Run(Interface *i, const Query &query) override; - Result RunQuery(const Query &query); + Result RunQuery(const Query &query) override; std::vector InitSchema(const Anope::string &prefix) override; std::vector Replace(const Anope::string &table, const Query &, const std::set &) override; @@ -100,7 +100,7 @@ class SQLiteService : public Provider Serialize::ID GetID(const Anope::string &prefix, const Anope::string &type) override; - Query GetTables(const Anope::string &prefix); + Query GetTables(const Anope::string &prefix) override; Anope::string BuildQuery(const Query &q); @@ -113,7 +113,7 @@ class ModuleSQLite : public Module std::map SQLiteServices; public: - ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) + ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { } diff --git a/src/logger.cpp b/src/logger.cpp index 2e00ae049..ae5709052 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -112,6 +112,8 @@ bool LogInfo::HasType(LogType ltype, LogLevel level, const Anope::string &type) case LogLevel::DEBUG_2: case LogLevel::DEBUG_3: return false; + case LogLevel::NORMAL: + break; } const std::vector *list = NULL; @@ -336,6 +338,8 @@ Anope::string Logger::BuildPrefix() const return "USER: "; case LogType::MODULE: return this->module != nullptr ? (this->module->name.upper() + ": ") : ""; + case LogType::NORMAL: + break; } return ""; -- cgit