Fix signed/unsigned comparison error.
GCC 4.9 (the next compiler) issues warnings, which become errors, for
attempts to compare signed vs. unsigned numbers. This patch fixes one
such bug.
BUG=None
TEST=Ran trybots with this change.
Change-Id: I396c88d78410ba3e107bcba3ef03aa2c6aca044c
Reviewed-on: https://chromium-review.googlesource.com/201751
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
diff --git a/platform.cc b/platform.cc
index 8a1e3b2..e16e123 100644
--- a/platform.cc
+++ b/platform.cc
@@ -826,9 +826,10 @@
long AddEcryptfsAuthToken(const chromeos::SecureBlob& key,
const std::string& key_sig,
const chromeos::SecureBlob& salt) {
- DCHECK_EQ(ECRYPTFS_MAX_KEY_BYTES, key.size());
- DCHECK_EQ(ECRYPTFS_SIG_SIZE * 2, key_sig.length());
- DCHECK_EQ(ECRYPTFS_SALT_SIZE, salt.size());
+ DCHECK_EQ(static_cast<size_t>(ECRYPTFS_MAX_KEY_BYTES),
+ key.size());
+ DCHECK_EQ(static_cast<size_t>(ECRYPTFS_SIG_SIZE) * 2, key_sig.length());
+ DCHECK_EQ(static_cast<size_t>(ECRYPTFS_SALT_SIZE), salt.size());
struct ecryptfs_auth_tok auth_token;