diff --git a/peerconnection/samples/server/main.cc b/peerconnection/samples/server/main.cc index 1c46ce283..c1c328dea 100644 --- a/peerconnection/samples/server/main.cc +++ b/peerconnection/samples/server/main.cc @@ -19,7 +19,7 @@ #include "peerconnection/samples/server/peer_channel.h" #include "peerconnection/samples/server/utils.h" -static const int kMaxConnections = (FD_SETSIZE - 2); +static const size_t kMaxConnections = (FD_SETSIZE - 2); void HandleBrowserRequest(DataSocket* ds, bool* quit) { assert(ds && ds->valid()); diff --git a/peerconnection/samples/server/peer_channel.cc b/peerconnection/samples/server/peer_channel.cc index 1c8cf987f..07b66bc18 100644 --- a/peerconnection/samples/server/peer_channel.cc +++ b/peerconnection/samples/server/peer_channel.cc @@ -160,7 +160,7 @@ ChannelMember* PeerChannel::Lookup(DataSocket* ds) const { static const char* kRequests[] = { "/wait", "/sign_out", "/message", }; - int i = 0; + size_t i = 0; for (; i < ARRAYSIZE(kRequests); ++i) { if (ds->PathEquals(kRequests[i])) break; @@ -228,7 +228,7 @@ bool PeerChannel::AddMember(DataSocket* ds) { HandleDeliveryFailures(&failures); members_.push_back(new_guy); - printf("New member added (total=%i): %s\n", + printf("New member added (total=%lu): %s\n", members_.size(), new_guy->name().c_str()); // Let the newly connected peer know about other members of the channel. @@ -261,7 +261,7 @@ void PeerChannel::OnClosing(DataSocket* ds) { break; } } - printf("Total connected: %i\n", members_.size()); + printf("Total connected: %lu\n", members_.size()); } void PeerChannel::CheckForTimeout() {