Fixing compiler warnings (addresses #388)

This commit is contained in:
Jon Siwek 2011-11-01 14:44:38 -05:00
parent c2683afc01
commit cec4600d2e
15 changed files with 54 additions and 53 deletions

View file

@ -392,7 +392,7 @@ static bool sendToIO(ChunkedIO* io, ChunkedIO::Chunk* c)
{
if ( ! io->Write(c) )
{
reporter->Warning(fmt("can't send chunk: %s", io->Error()));
reporter->Warning("%s", fmt("can't send chunk: %s", io->Error()));
return false;
}
@ -404,7 +404,7 @@ static bool sendToIO(ChunkedIO* io, char msg_type, RemoteSerializer::PeerID id,
{
if ( ! sendCMsg(io, msg_type, id) )
{
reporter->Warning(fmt("can't send message of type %d: %s", msg_type, io->Error()));
reporter->Warning("%s", fmt("can't send message of type %d: %s", msg_type, io->Error()));
return false;
}
@ -419,7 +419,7 @@ static bool sendToIO(ChunkedIO* io, char msg_type, RemoteSerializer::PeerID id,
{
if ( ! sendCMsg(io, msg_type, id) )
{
reporter->Warning(fmt("can't send message of type %d: %s", msg_type, io->Error()));
reporter->Warning("%s", fmt("can't send message of type %d: %s", msg_type, io->Error()));
return false;
}
@ -715,7 +715,7 @@ bool RemoteSerializer::CloseConnection(PeerID id)
Peer* peer = LookupPeer(id, true);
if ( ! peer )
{
reporter->Error(fmt("unknown peer id %d for closing connection", int(id)));
reporter->Error("%s", fmt("unknown peer id %d for closing connection", int(id)));
return false;
}
@ -750,13 +750,13 @@ bool RemoteSerializer::RequestSync(PeerID id, bool auth)
Peer* peer = LookupPeer(id, true);
if ( ! peer )
{
reporter->Error(fmt("unknown peer id %d for request sync", int(id)));
reporter->Error("%s", fmt("unknown peer id %d for request sync", int(id)));
return false;
}
if ( peer->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't request sync from peer; wrong phase %d",
reporter->Error("%s", fmt("can't request sync from peer; wrong phase %d",
peer->phase));
return false;
}
@ -777,13 +777,13 @@ bool RemoteSerializer::RequestLogs(PeerID id)
Peer* peer = LookupPeer(id, true);
if ( ! peer )
{
reporter->Error(fmt("unknown peer id %d for request logs", int(id)));
reporter->Error("%s", fmt("unknown peer id %d for request logs", int(id)));
return false;
}
if ( peer->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't request logs from peer; wrong phase %d",
reporter->Error("%s", fmt("can't request logs from peer; wrong phase %d",
peer->phase));
return false;
}
@ -802,13 +802,13 @@ bool RemoteSerializer::RequestEvents(PeerID id, RE_Matcher* pattern)
Peer* peer = LookupPeer(id, true);
if ( ! peer )
{
reporter->Error(fmt("unknown peer id %d for request sync", int(id)));
reporter->Error("%s", fmt("unknown peer id %d for request sync", int(id)));
return false;
}
if ( peer->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't request events from peer; wrong phase %d",
reporter->Error("%s", fmt("can't request events from peer; wrong phase %d",
peer->phase));
return false;
}
@ -869,7 +869,7 @@ bool RemoteSerializer::CompleteHandshake(PeerID id)
if ( p->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't complete handshake; wrong phase %d",
reporter->Error("%s", fmt("can't complete handshake; wrong phase %d",
p->phase));
return false;
}
@ -1138,7 +1138,7 @@ bool RemoteSerializer::SendCaptureFilter(PeerID id, const char* filter)
if ( peer->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't sent capture filter to peer; wrong phase %d", peer->phase));
reporter->Error("%s", fmt("can't sent capture filter to peer; wrong phase %d", peer->phase));
return false;
}
@ -1215,7 +1215,7 @@ bool RemoteSerializer::SendCapabilities(Peer* peer)
{
if ( peer->phase != Peer::HANDSHAKE )
{
reporter->Error(fmt("can't sent capabilties to peer; wrong phase %d",
reporter->Error("%s", fmt("can't sent capabilties to peer; wrong phase %d",
peer->phase));
return false;
}
@ -3011,7 +3011,7 @@ bool RemoteSerializer::SendCMsgToChild(char msg_type, Peer* peer)
{
if ( ! sendCMsg(io, msg_type, peer ? peer->id : PEER_NONE) )
{
reporter->Warning(fmt("can't send message of type %d: %s",
reporter->Warning("%s", fmt("can't send message of type %d: %s",
msg_type, io->Error()));
return false;
}