Pedantic safe

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8317 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-10-23 20:09:58 +00:00
parent 08e3151057
commit 4be79b1630
21 changed files with 39 additions and 39 deletions

View File

@ -19,7 +19,7 @@
#include <dlfcn.h>
#endif
DLLManager::DLLManager(InspIRCd* ServerInstance, const char *fname)
DLLManager::DLLManager(InspIRCd*, const char *fname)
{
err = NULL;

View File

@ -35,7 +35,7 @@ bool FileLogger::Readable()
return false;
}
void FileLogger::HandleEvent(EventType et, int errornum)
void FileLogger::HandleEvent(EventType, int)
{
WriteLogLine("");
if (log)

View File

@ -507,7 +507,7 @@ bool IsIdentHandler::Call(const char* n)
}
/* open the proper logfile */
bool InspIRCd::OpenLog(char** argv, int argc)
bool InspIRCd::OpenLog(char**, int)
{
Config->MyDir = Config->GetFullProgDir();

View File

@ -528,7 +528,7 @@ bool BufferedSocket::FlushWriteBuffer()
return (fd < 0);
}
void SocketTimeout::Tick(time_t now)
void SocketTimeout::Tick(time_t)
{
if (ServerInstance->SE->GetRef(this->sfd) != this->sock)
return;
@ -666,9 +666,9 @@ int BufferedSocket::GetFd()
}
bool BufferedSocket::OnConnected() { return true; }
void BufferedSocket::OnError(BufferedSocketError e) { return; }
void BufferedSocket::OnError(BufferedSocketError) { return; }
int BufferedSocket::OnDisconnect() { return 0; }
int BufferedSocket::OnIncomingConnection(int newfd, char* ip) { return 0; }
int BufferedSocket::OnIncomingConnection(int, char*) { return 0; }
bool BufferedSocket::OnDataReady() { return true; }
bool BufferedSocket::OnWriteReady() { return true; }
void BufferedSocket::OnTimeout() { return; }

View File

@ -29,7 +29,7 @@ ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(Instance, 'b',
{
}
ModeAction ModeChannelBan::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
int status = channel->GetStatus(source);
/* Call the correct method depending on wether we're adding or removing the mode */
@ -67,7 +67,7 @@ void ModeChannelBan::RemoveMode(Channel* channel)
}
}
void ModeChannelBan::RemoveMode(User* user)
void ModeChannelBan::RemoveMode(User*)
{
}
@ -87,7 +87,7 @@ void ModeChannelBan::DisplayEmptyList(User* user, Channel* channel)
user->WriteServ("368 %s %s :End of channel ban list",user->nick, channel->name);
}
std::string& ModeChannelBan::AddBan(User *user,std::string &dest,Channel *chan,int status)
std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan, int)
{
if ((!user) || (!chan))
{
@ -142,7 +142,7 @@ std::string& ModeChannelBan::AddBan(User *user,std::string &dest,Channel *chan,i
return dest;
}
ModePair ModeChannelBan::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelBan::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
{
@ -154,7 +154,7 @@ ModePair ModeChannelBan::ModeSet(User* source, User* dest, Channel* channel, con
return std::make_pair(false, parameter);
}
std::string& ModeChannelBan::DelBan(User *user,std::string& dest,Channel *chan,int status)
std::string& ModeChannelBan::DelBan(User *user, std::string& dest, Channel *chan, int)
{
if ((!user) || (!chan))
{

View File

@ -28,7 +28,7 @@ unsigned int ModeChannelHalfOp::GetPrefixRank()
return HALFOP_VALUE;
}
ModePair ModeChannelHalfOp::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelHalfOp::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
User* x = ServerInstance->FindNick(parameter);
if (x)
@ -66,11 +66,11 @@ void ModeChannelHalfOp::RemoveMode(Channel* channel)
}
void ModeChannelHalfOp::RemoveMode(User* user)
void ModeChannelHalfOp::RemoveMode(User*)
{
}
ModeAction ModeChannelHalfOp::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
/* If halfops are not enabled in the conf, we don't execute
* anything in this class at all.

View File

@ -21,7 +21,7 @@ ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : ModeHandler(I
{
}
ModeAction ModeChannelInviteOnly::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelInviteOnly::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_INVITEONLY] != adding)
{

View File

@ -21,7 +21,7 @@ ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, 'k',
{
}
ModePair ModeChannelKey::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelKey::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
if (channel->modes[CM_KEY])
{
@ -48,17 +48,17 @@ void ModeChannelKey::RemoveMode(Channel* channel)
}
}
void ModeChannelKey::RemoveMode(User* user)
void ModeChannelKey::RemoveMode(User*)
{
}
bool ModeChannelKey::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
bool ModeChannelKey::CheckTimeStamp(time_t, time_t, const std::string &their_param, const std::string &our_param, Channel*)
{
/* When TS is equal, the alphabetically later channel key wins */
return (their_param < our_param);
}
ModeAction ModeChannelKey::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
if ((channel->modes[CM_KEY] != adding) || (!IS_LOCAL(source)))
{

View File

@ -21,7 +21,7 @@ ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, '
{
}
ModePair ModeChannelLimit::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelLimit::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
if (channel->limit)
{
@ -33,13 +33,13 @@ ModePair ModeChannelLimit::ModeSet(User* source, User* dest, Channel* channel, c
}
}
bool ModeChannelLimit::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
bool ModeChannelLimit::CheckTimeStamp(time_t, time_t, const std::string &their_param, const std::string &our_param, Channel*)
{
/* When TS is equal, the higher channel limit wins */
return (atoi(their_param.c_str()) < atoi(our_param.c_str()));
}
ModeAction ModeChannelLimit::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{

View File

@ -21,7 +21,7 @@ ModeChannelModerated::ModeChannelModerated(InspIRCd* Instance) : ModeHandler(Ins
{
}
ModeAction ModeChannelModerated::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelModerated::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_MODERATED] != adding)
{

View File

@ -21,7 +21,7 @@ ModeChannelNoExternal::ModeChannelNoExternal(InspIRCd* Instance) : ModeHandler(I
{
}
ModeAction ModeChannelNoExternal::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelNoExternal::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_NOEXTERNAL] != adding)
{

View File

@ -28,7 +28,7 @@ unsigned int ModeChannelOp::GetPrefixRank()
return OP_VALUE;
}
ModePair ModeChannelOp::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelOp::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
User* x = ServerInstance->FindNick(parameter);
if (x)
@ -66,11 +66,11 @@ void ModeChannelOp::RemoveMode(Channel* channel)
}
}
void ModeChannelOp::RemoveMode(User* user)
void ModeChannelOp::RemoveMode(User*)
{
}
ModeAction ModeChannelOp::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
int status = channel->GetStatus(source);

View File

@ -21,7 +21,7 @@ ModeChannelPrivate::ModeChannelPrivate(InspIRCd* Instance) : ModeHandler(Instanc
{
}
ModeAction ModeChannelPrivate::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelPrivate::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_PRIVATE] != adding)
{

View File

@ -21,7 +21,7 @@ ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : ModeHandler(Instance,
{
}
ModeAction ModeChannelSecret::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelSecret::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_SECRET] != adding)
{

View File

@ -21,7 +21,7 @@ ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Insta
{
}
ModeAction ModeChannelTopicOps::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
{
if (channel->modes[CM_TOPICLOCK] != adding)
{

View File

@ -28,7 +28,7 @@ unsigned int ModeChannelVoice::GetPrefixRank()
return VOICE_VALUE;
}
ModePair ModeChannelVoice::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
ModePair ModeChannelVoice::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
{
User* x = ServerInstance->FindNick(parameter);
if (x)
@ -65,11 +65,11 @@ void ModeChannelVoice::RemoveMode(Channel* channel)
}
}
void ModeChannelVoice::RemoveMode(User* user)
void ModeChannelVoice::RemoveMode(User*)
{
}
ModeAction ModeChannelVoice::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
int status = channel->GetStatus(source);

View File

@ -21,7 +21,7 @@ ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : ModeHandler(Instance,
{
}
ModeAction ModeUserInvisible::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeUserInvisible::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding)
{
/* Only opers can change other users modes */
if ((source != dest) && (!*source->oper))

View File

@ -21,13 +21,13 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHan
{
}
ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string &parameter, bool adding)
{
/* Only opers can change other users modes */
if ((source != dest) && (!*source->oper))
return MODEACTION_DENY;
/* Set the bitfields */
/* Set the array fields */
if (adding)
{
/* Fix for bug #310 reported by Smartys */

View File

@ -21,7 +21,7 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, '
{
}
ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding)
{
/* Only opers can execute this class at all */
if (!*source->oper)

View File

@ -21,7 +21,7 @@ ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Ins
{
}
ModeAction ModeUserServerNotice::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeUserServerNotice::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding)
{
/* Only opers can change other users modes */
if ((source != dest) && (!*source->oper))

View File

@ -21,7 +21,7 @@ ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w'
{
}
ModeAction ModeUserWallops::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
ModeAction ModeUserWallops::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding)
{
/* Only opers can change other users modes */
if ((source != dest) && (!*source->oper))