summaryrefslogtreecommitdiffstats
path: root/remoting/base
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 22:13:43 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 22:13:43 +0000
commit887cec87432cce92d06a39b62a9ce4f57260acc9 (patch)
tree910e78a9e37009c7774a097872d2769ca50226db /remoting/base
parent0c860d067e62556bad67620240abc9abfeb85c7d (diff)
downloadchromium_src-887cec87432cce92d06a39b62a9ce4f57260acc9.zip
chromium_src-887cec87432cce92d06a39b62a9ce4f57260acc9.tar.gz
chromium_src-887cec87432cce92d06a39b62a9ce4f57260acc9.tar.bz2
Tighten up compile warnings based to match other chromium sub-projects.
Fix up the issues that the new warnings raised. BUG=none TEST=build remoting cleanly Review URL: http://codereview.chromium.org/2801003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base')
-rw-r--r--remoting/base/multiple_array_input_stream_unittest.cc4
-rw-r--r--remoting/base/protocol_decoder.cc9
-rw-r--r--remoting/base/protocol_decoder.h6
3 files changed, 9 insertions, 10 deletions
diff --git a/remoting/base/multiple_array_input_stream_unittest.cc b/remoting/base/multiple_array_input_stream_unittest.cc
index 810596c..d8397c7 100644
--- a/remoting/base/multiple_array_input_stream_unittest.cc
+++ b/remoting/base/multiple_array_input_stream_unittest.cc
@@ -9,8 +9,8 @@
namespace remoting {
-static int ReadFromInput(MultipleArrayInputStream* input,
- void* data, int size) {
+static size_t ReadFromInput(MultipleArrayInputStream* input,
+ void* data, size_t size) {
uint8* out = reinterpret_cast<uint8*>(data);
int out_size = size;
diff --git a/remoting/base/protocol_decoder.cc b/remoting/base/protocol_decoder.cc
index 3b60f2b..3724f5a 100644
--- a/remoting/base/protocol_decoder.cc
+++ b/remoting/base/protocol_decoder.cc
@@ -69,9 +69,8 @@ bool ProtocolDecoder::ParseOneMessage(T** message) {
std::deque<int> buffer_sizes;
while (next_payload_ > 0 && !data_list_.empty()) {
scoped_refptr<media::DataBuffer> buffer = data_list_.front();
- int read_bytes = std::min(
- static_cast<int>(buffer->GetDataSize()) - last_read_position_,
- next_payload_);
+ size_t read_bytes = std::min(buffer->GetDataSize() - last_read_position_,
+ next_payload_);
buffers.push_back(buffer);
buffer_pointers.push_back(buffer->GetData() + last_read_position_);
@@ -88,7 +87,7 @@ bool ProtocolDecoder::ParseOneMessage(T** message) {
last_read_position_ = 0;
}
}
- DCHECK_EQ(0, next_payload_);
+ DCHECK_EQ(0UL, next_payload_);
DCHECK_EQ(buffers.size(), buffer_pointers.size());
DCHECK_EQ(buffers.size(), buffer_sizes.size());
@@ -108,7 +107,7 @@ bool ProtocolDecoder::ParseOneMessage(T** message) {
bool ProtocolDecoder::GetPayloadSize(int* size) {
// The header has a size of 4 bytes.
- const int kHeaderSize = sizeof(int32);
+ const size_t kHeaderSize = sizeof(int32);
if (available_bytes_ < kHeaderSize)
return false;
diff --git a/remoting/base/protocol_decoder.h b/remoting/base/protocol_decoder.h
index c817723..119198f 100644
--- a/remoting/base/protocol_decoder.h
+++ b/remoting/base/protocol_decoder.h
@@ -54,13 +54,13 @@ class ProtocolDecoder {
typedef std::deque<scoped_refptr<media::DataBuffer> > DataList;
DataList data_list_;
- int last_read_position_;
+ size_t last_read_position_;
// Count the number of bytes in |data_list_| not read.
- int available_bytes_;
+ size_t available_bytes_;
// Stores the size of the next payload if known.
- int next_payload_;
+ size_t next_payload_;
// True if the size of the next payload is known. After one payload is read,
// this is reset to false.