summaryrefslogtreecommitdiff
path: root/core/fxcrt/include/fx_string.h
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
committerWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
commit05d53f0355e9889c43bfa436e985d5643f249d99 (patch)
treeeca037b407114efe357e8280a96e44eee182cdfc /core/fxcrt/include/fx_string.h
parent602aebc11a615971800d38f8d427a4e4f95c1134 (diff)
downloadpdfium-05d53f0355e9889c43bfa436e985d5643f249d99.tar.xz
Code change to avoid signed/unsigned mismatch warnings.
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
Diffstat (limited to 'core/fxcrt/include/fx_string.h')
-rw-r--r--core/fxcrt/include/fx_string.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index e5f9466b21..0aa34171c2 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -134,7 +134,9 @@ inline bool operator==(const char* lhs, const CFX_ByteStringC& rhs) {
inline bool operator!=(const char* lhs, const CFX_ByteStringC& rhs) {
return rhs != lhs;
}
-#define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4))
+#define FXBSTR_ID(c1, c2, c3, c4) \
+ (((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | \
+ ((uint32_t)c4))
// A mutable string with shared buffers using copy-on-write semantics that
// avoids the cost of std::string's iterator stability guarantees.