Skip to content

Commit

Permalink
Fix set-but-not-used and var shadowing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir Poggles committed Jun 13, 2012
1 parent ba9366e commit 26b1532
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,12 +917,12 @@ void Channel::UserList(User *user, CUList *ulist)
if (i->first->Visibility && !i->first->Visibility->VisibleTo(user))
continue;

std::string prefixlist = this->GetPrefixChar(i->first);
std::string prelist = this->GetPrefixChar(i->first);
std::string nick = i->first->nick;

if (call_modules)
{
FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->first, this, prefixlist, nick));
FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->first, this, prelist, nick));

/* Nick was nuked, a module wants us to skip it */
if (nick.empty())
Expand All @@ -931,7 +931,7 @@ void Channel::UserList(User *user, CUList *ulist)

size_t ptrlen = 0;

if (curlen + prefixlist.length() + nick.length() + 1 > 480)
if (curlen + prelist.length() + nick.length() + 1 > 480)
{
/* list overflowed into multiple numerics */
user->WriteNumeric(RPL_NAMREPLY, std::string(list));
Expand All @@ -944,7 +944,7 @@ void Channel::UserList(User *user, CUList *ulist)
numusers = 0;
}

ptrlen = snprintf(ptr, MAXBUF, "%s%s ", prefixlist.c_str(), nick.c_str());
ptrlen = snprintf(ptr, MAXBUF, "%s%s ", prelist.c_str(), nick.c_str());

curlen += ptrlen;
ptr += ptrlen;
Expand Down
4 changes: 0 additions & 4 deletions src/configreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,6 @@ bool ServerConfig::ParseLine(const std::string &filename, std::string &line, lon
std::string current_key;
std::string current_value;
KeyValList results;
char last_char = 0;
bool got_name;
bool got_key;
bool in_quote;
Expand Down Expand Up @@ -1661,10 +1660,7 @@ bool ServerConfig::ParseLine(const std::string &filename, std::string &line, lon
else
{
if (in_quote)
{
last_char = *c;
current_value += *c;
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/m_spanningtree/capab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ void TreeSocket::SendCapabilities()
return;

sentcapab = true;
irc::commasepstream modulelist(MyCapabilities());
irc::commasepstream modlist(MyCapabilities());
this->WriteLine("CAPAB START");

/* Send module names, split at 509 length */
std::string item;
std::string line = "CAPAB MODULES ";
while (modulelist.GetToken(item))
while (modlist.GetToken(item))
{
if (line.length() + item.length() + 1 > 509)
{
Expand Down
2 changes: 0 additions & 2 deletions src/userprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ void ProcessUserHandler::Call(User* cu)
if ((result) && (result != -EAGAIN))
{
User *current;
int currfd;

Server->stats->statsRecv += result;
/*
Expand All @@ -103,7 +102,6 @@ void ProcessUserHandler::Call(User* cu)
ReadBuffer[result] = '\0';

current = cu;
currfd = current->GetFd();

// add the data to the users buffer
if (result > 0)
Expand Down

0 comments on commit 26b1532

Please sign in to comment.