diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 21:00:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 21:00:35 +0000 |
commit | 2e1f86fd0c9911210b79e6ac346672441eef18c4 (patch) | |
tree | 9151566c4c38be05335dbbe907d64bc3085c664b | |
parent | 7240c926c8e9aeacf95c2bd4803c8879963cca3f (diff) |
All of insp now builds with -pedantic (theres some warnings to squash in modules, and in spanningtree, but its all 'unused parameter').
I suggest we actually go through and satisfy these unused parameter errors for two reasons:
(1) it acts as a strong compiler hint leading to better optimization
(2) it will give us a good clue of what parameters are NEVER used and should therefore be removed from use (like i just did with AddMode)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8323 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlauth.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqllog.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlutils.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_oper_cert.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sslinfo.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_testclient.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ziplink.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_operchans.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_operflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_redirect.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rpc_json.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rpctest.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_services.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_servprotect.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_showwhois.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sslmodes.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 2 |
23 files changed, 27 insertions, 25 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 3120836c9..34e653e2a 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -983,4 +983,4 @@ void SQLConn::DelayReconnect() ((ModulePgSQL*)us)->ReconnectConn(this); } -MODULE_INIT(ModulePgSQL); +MODULE_INIT(ModulePgSQL) diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 8eb451f47..98b0227e5 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -190,4 +190,4 @@ public: }; -MODULE_INIT(ModuleSQLAuth); +MODULE_INIT(ModuleSQLAuth) diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 0f0da20a1..6ba5967f3 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -656,5 +656,5 @@ void ResultNotifier::Dispatch() ((ModuleSQLite3*)mod)->SendQueue(); } -MODULE_INIT(ModuleSQLite3); +MODULE_INIT(ModuleSQLite3) diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 6194e502d..9376ad265 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -310,4 +310,4 @@ class ModuleSQLLog : public Module }; -MODULE_INIT(ModuleSQLLog); +MODULE_INIT(ModuleSQLLog) diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index c697d6a9b..530662870 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -279,4 +279,4 @@ public: }; -MODULE_INIT(ModuleSQLOper); +MODULE_INIT(ModuleSQLOper) diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp index b53186f71..07cecc698 100644 --- a/src/modules/extra/m_sqlutils.cpp +++ b/src/modules/extra/m_sqlutils.cpp @@ -234,4 +234,4 @@ public: }; -MODULE_INIT(ModuleSQLutils); +MODULE_INIT(ModuleSQLutils) diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 323fe912f..4b059ca9f 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -864,4 +864,4 @@ class ModuleSSLGnuTLS : public Module }; -MODULE_INIT(ModuleSSLGnuTLS); +MODULE_INIT(ModuleSSLGnuTLS) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index b845af6b6..5355e1855 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -891,4 +891,4 @@ static int error_callback(const char *str, size_t len, void *u) return 0; } -MODULE_INIT(ModuleSSLOpenSSL); +MODULE_INIT(ModuleSSLOpenSSL) diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp index 3d0e81928..38dbb8f20 100644 --- a/src/modules/extra/m_ssl_oper_cert.cpp +++ b/src/modules/extra/m_ssl_oper_cert.cpp @@ -176,5 +176,5 @@ class ModuleOperSSLCert : public Module } }; -MODULE_INIT(ModuleOperSSLCert); +MODULE_INIT(ModuleOperSSLCert) diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index 0d3dce2eb..d87ac64e3 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -90,5 +90,5 @@ class ModuleSSLInfo : public Module } }; -MODULE_INIT(ModuleSSLInfo); +MODULE_INIT(ModuleSSLInfo) diff --git a/src/modules/extra/m_testclient.cpp b/src/modules/extra/m_testclient.cpp index da0d36df8..179a14a19 100644 --- a/src/modules/extra/m_testclient.cpp +++ b/src/modules/extra/m_testclient.cpp @@ -106,4 +106,5 @@ public: } }; -MODULE_INIT(ModuleTestClient); +MODULE_INIT(ModuleTestClient) + diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index c7ba1b6af..89262817a 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -448,5 +448,5 @@ class ModuleZLib : public Module }; -MODULE_INIT(ModuleZLib); +MODULE_INIT(ModuleZLib) diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 4c3ae4798..2171db860 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -54,7 +54,7 @@ class ModuleOperChans : public Module { oc = new OperChans(ServerInstance); - if (!ServerInstance->AddMode(oc, 'O')) + if (!ServerInstance->AddMode(oc)) throw ModuleException("Could not add new modes!"); } diff --git a/src/modules/m_operflood.cpp b/src/modules/m_operflood.cpp index 9f4f56ebc..4532b7d3e 100644 --- a/src/modules/m_operflood.cpp +++ b/src/modules/m_operflood.cpp @@ -43,4 +43,4 @@ public: }
};
-MODULE_INIT(ModuleOperFlood);
+MODULE_INIT(ModuleOperFlood)
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 46b8fbe19..0a4f43fd4 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -105,7 +105,7 @@ class ModuleRedirect : public Module { re = new Redirect(ServerInstance); - if (!ServerInstance->AddMode(re, 'L')) + if (!ServerInstance->AddMode(re)) throw ModuleException("Could not add new modes!"); } diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp index 6fcb26331..b12de0891 100644 --- a/src/modules/m_rpc_json.cpp +++ b/src/modules/m_rpc_json.cpp @@ -370,4 +370,4 @@ class ModuleRpcJson : public Module } }; -MODULE_INIT(ModuleRpcJson); +MODULE_INIT(ModuleRpcJson) diff --git a/src/modules/m_rpctest.cpp b/src/modules/m_rpctest.cpp index 720e7a9e5..1d3f2a71e 100644 --- a/src/modules/m_rpctest.cpp +++ b/src/modules/m_rpctest.cpp @@ -64,4 +64,5 @@ class ModuleRPCTest : public Module } }; -MODULE_INIT(ModuleRPCTest); +MODULE_INIT(ModuleRPCTest) + diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index 88a6b8fb9..07d10aad5 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -179,8 +179,8 @@ class ModuleServices : public Module m4 = new User_r(ServerInstance); m5 = new User_R(ServerInstance); - if (!ServerInstance->AddMode(m1, 'r') || !ServerInstance->AddMode(m2, 'R') || !ServerInstance->AddMode(m3, 'M') - || !ServerInstance->AddMode(m4, 'r') || !ServerInstance->AddMode(m5, 'R')) + if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3) + || !ServerInstance->AddMode(m4) || !ServerInstance->AddMode(m5)) { throw ModuleException("Could not add user and channel modes!"); } diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 5aa86a910..e5c62ae6c 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -118,7 +118,7 @@ class ModuleServicesAccount : public Module m1 = new AChannel_R(ServerInstance); m2 = new AChannel_M(ServerInstance); m3 = new AUser_R(ServerInstance); - if (!ServerInstance->AddMode(m1, 'R') || !ServerInstance->AddMode(m2, 'M') || !ServerInstance->AddMode(m3, 'R')) + if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3)) throw ModuleException("Could not add new modes!"); } diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 852ad6d3f..6651f5362 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -46,7 +46,7 @@ class ModuleServProtectMode : public Module { bm = new ServProtectMode(ServerInstance); - if (!ServerInstance->AddMode(bm, 'k')) + if (!ServerInstance->AddMode(bm)) throw ModuleException("Could not add new modes!"); } diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 5acb9b513..02a74535c 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -60,7 +60,7 @@ class ModuleShowwhois : public Module { sw = new SeeWhois(ServerInstance); - if (!ServerInstance->AddMode(sw, 'W')) + if (!ServerInstance->AddMode(sw)) throw ModuleException("Could not add new modes!"); } diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index e31d41c0b..0cdb60697 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -75,7 +75,7 @@ class ModuleSSLModes : public Module sslm = new SSLMode(ServerInstance); - if (!ServerInstance->AddMode(sslm, 'z')) + if (!ServerInstance->AddMode(sslm)) throw ModuleException("Could not add new modes!"); } @@ -117,5 +117,5 @@ class ModuleSSLModes : public Module }; -MODULE_INIT(ModuleSSLModes); +MODULE_INIT(ModuleSSLModes) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 8ed4bb49b..6e0100b46 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -92,7 +92,7 @@ class ModuleStripColor : public Module usc = new UserStripColor(ServerInstance); csc = new ChannelStripColor(ServerInstance); - if (!ServerInstance->AddMode(usc, 'S') || !ServerInstance->AddMode(csc, 'S')) + if (!ServerInstance->AddMode(usc) || !ServerInstance->AddMode(csc)) throw ModuleException("Could not add new modes!"); } |