aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/fastmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/fastmem.h')
-rw-r--r--src/google/protobuf/stubs/fastmem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/fastmem.h b/src/google/protobuf/stubs/fastmem.h
index 763a6e60..1f1f6ed3 100644
--- a/src/google/protobuf/stubs/fastmem.h
+++ b/src/google/protobuf/stubs/fastmem.h
@@ -111,7 +111,8 @@ inline int fastmemcmp_inlined(const char *a, const char *b, size_t n) {
b += sizeof(uint32);
}
while (a < a_limit) {
- int d = static_cast<uint32>(*a++) - static_cast<uint32>(*b++);
+ int d =
+ static_cast<int>(static_cast<uint32>(*a++) - static_cast<uint32>(*b++));
if (d) return d;
}
return 0;