diff options
author | brucedawson <brucedawson@chromium.org> | 2015-12-02 17:54:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-03 01:55:35 +0000 |
commit | c8e9e0d00bc2ba692ee4e61ae728a50e911513c1 (patch) | |
tree | bfbcb8da6e5e414de5577c01a3c263d77ee6578c /google_apis | |
parent | 77c735a0eb3207605a8b5f841574468d7dcb8c81 (diff) | |
download | chromium_src-c8e9e0d00bc2ba692ee4e61ae728a50e911513c1.zip chromium_src-c8e9e0d00bc2ba692ee4e61ae728a50e911513c1.tar.gz chromium_src-c8e9e0d00bc2ba692ee4e61ae728a50e911513c1.tar.bz2 |
Misc fixes for gn builds with VS 2015
These changes are enough to get gn_all building with VS 2015 in
32-bit gn builds. The changes are mostly to fix warnings about
truncation from size_t to smaller types.
One fix is to avoid illegal #defines, already fixed in the GYP builds.
Warning 4267 is disabled in the main BUILD.gn file because many of the
4244 warnings that VC++ 2013 emits are now emitted as 4267, so we need
to disable 4267 everywhere that 4244 is disabled. Fixing the code is
best done as a separate task.
The code fixes are to avoid truncations, mostly by using more
appropriate types.
BUG=440500
Review URL: https://codereview.chromium.org/1488933002
Cr-Commit-Position: refs/heads/master@{#362858}
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/gcm/base/mcs_util_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/google_apis/gcm/base/mcs_util_unittest.cc b/google_apis/gcm/base/mcs_util_unittest.cc index d51f5a07..34d482d 100644 --- a/google_apis/gcm/base/mcs_util_unittest.cc +++ b/google_apis/gcm/base/mcs_util_unittest.cc @@ -31,12 +31,12 @@ TEST(MCSUtilTest, BuildLoginRequest) { // Test building a protobuf and extracting the tag from a protobuf. TEST(MCSUtilTest, ProtobufToTag) { - for (size_t i = 0; i < kNumProtoTypes; ++i) { + for (uint8 i = 0; i < kNumProtoTypes; ++i) { scoped_ptr<google::protobuf::MessageLite> protobuf = BuildProtobufFromTag(i); if (!protobuf.get()) // Not all tags have protobuf definitions. continue; - ASSERT_EQ((int)i, GetMCSProtoTag(*protobuf)) << "Type " << i; + ASSERT_EQ(i, GetMCSProtoTag(*protobuf)) << "Type " << i; } } |