From d15afa86c2084189bb80dfa6af954b5f456d40ec Mon Sep 17 00:00:00 2001 From: "tommi@google.com" Date: Tue, 9 Aug 2011 13:40:24 +0000 Subject: [PATCH] fix build warnings on linux. Review URL: http://webrtc-codereview.appspot.com/99003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@335 4adac7df-926f-26a2-2b94-8c16560cd09d --- peerconnection/samples/server/main.cc | 2 +- peerconnection/samples/server/peer_channel.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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() {