aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/io/coded_stream.h
diff options
context:
space:
mode:
authorkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-01-11 18:38:22 +0000
committerkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-01-11 18:38:22 +0000
commit2113840aa01c61a319ff1d2a52f557f4b44362d4 (patch)
tree21c327ccc07faeb048119eddba979e436e712871 /src/google/protobuf/io/coded_stream.h
parentd4e38c7fc9468660b0f4233ffff78d915554b4f2 (diff)
downloadprotobuf-2113840aa01c61a319ff1d2a52f557f4b44362d4.tar.gz
protobuf-2113840aa01c61a319ff1d2a52f557f4b44362d4.tar.bz2
protobuf-2113840aa01c61a319ff1d2a52f557f4b44362d4.zip
Fix bogus sign-compare warnings in header at request of user.
Diffstat (limited to 'src/google/protobuf/io/coded_stream.h')
-rw-r--r--src/google/protobuf/io/coded_stream.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index dcbb0d45..360fcf1b 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -773,7 +773,7 @@ inline const uint8* CodedInputStream::ReadLittleEndian64FromArray(
inline bool CodedInputStream::ReadLittleEndian32(uint32* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
- if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) {
+ if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
memcpy(value, buffer_, sizeof(*value));
Advance(sizeof(*value));
return true;
@@ -788,7 +788,7 @@ inline bool CodedInputStream::ReadLittleEndian32(uint32* value) {
inline bool CodedInputStream::ReadLittleEndian64(uint64* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
- if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) {
+ if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
memcpy(value, buffer_, sizeof(*value));
Advance(sizeof(*value));
return true;