From 7a15dd936f876882999a18117937d2eeef2e7dc0 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 7 Jul 2015 23:49:53 +0100 Subject: Fix various Clang compiler warnings. include/modules/sql.h:103:10: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] modules/database/db_sql.cpp:273:15: warning: declaration shadows a local variable [-Wshadow] modules/pseudoclients/chanserv/chanserv.cpp:319:150: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] modules/pseudoclients/chanserv/chanserv.cpp:329:80: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] --- modules/database/db_sql.cpp | 4 ++-- modules/pseudoclients/chanserv/chanserv.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 4f6a1e909..fed0050e4 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -270,8 +270,8 @@ class DBMySQL : public Module, public Pipe else q.SetNull(field->GetName()); - for (Query &q : SQL->Replace(prefix + object->GetSerializableType()->GetName(), q, { "id" })) - Run(q); + for (Query &q2 : SQL->Replace(prefix + object->GetSerializableType()->GetName(), q, { "id" })) + Run(q2); } public: diff --git a/modules/pseudoclients/chanserv/chanserv.cpp b/modules/pseudoclients/chanserv/chanserv.cpp index 3bab894e9..5dd83188f 100644 --- a/modules/pseudoclients/chanserv/chanserv.cpp +++ b/modules/pseudoclients/chanserv/chanserv.cpp @@ -310,7 +310,7 @@ class ChanServCore : public Module void OnDelCore(NickServ::Account *nc) override { - int max_reg = Config->GetModule(this)->Get("maxregistered"); + unsigned int max_reg = Config->GetModule(this)->Get("maxregistered"); for (ChanServ::Channel *ci : nc->GetRefs(ChanServ::channel)) { if (ci->GetFounder() == nc) -- cgit