diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-14 07:22:22 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-14 07:22:22 +0000 |
commit | fd3836f435bf04ce0f72b42fe50f9a2b8c8835b8 (patch) | |
tree | 14dc99e01fcbb6e898a288b19a7c93215b6831ac | |
parent | 13e4f3427f8b0f458cfedd9512785d8e44e5b16c (diff) | |
download | chromium_src-fd3836f435bf04ce0f72b42fe50f9a2b8c8835b8.zip chromium_src-fd3836f435bf04ce0f72b42fe50f9a2b8c8835b8.tar.gz chromium_src-fd3836f435bf04ce0f72b42fe50f9a2b8c8835b8.tar.bz2 |
Mojo: ~0 -> ~0u, since the compiler on Linux Trusty doesn't like the conversion.
From the FYI bots:
FAILED: c++ -MMD -MF obj/mojo/system/mojo_system_unittests.shared_buffer_dispatcher_unittest.o.d [...]
../../mojo/system/shared_buffer_dispatcher_unittest.cc: In member function ‘virtual void mojo::system::{anonymous}::SharedBufferDispatcherTest_DuplicateBufferHandleOptionsValid_Test::TestBody()’:
../../mojo/system/shared_buffer_dispatcher_unittest.cc:183:3: error: narrowing conversion of ‘-1’ from ‘int’ to ‘MojoDuplicateBufferHandleOptionsFlags {aka unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
};
^
As a drive-by, eliminate a couple of static_casts that no one wants.
R=darin@chromium.org
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/333803012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277186 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | mojo/system/shared_buffer_dispatcher_unittest.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mojo/system/shared_buffer_dispatcher_unittest.cc b/mojo/system/shared_buffer_dispatcher_unittest.cc index 2683751..8534ae5 100644 --- a/mojo/system/shared_buffer_dispatcher_unittest.cc +++ b/mojo/system/shared_buffer_dispatcher_unittest.cc @@ -21,8 +21,7 @@ namespace { // expanded if/when options are added, so I've kept the general form of the // tests from data_pipe_unittest.cc. -const uint32_t kSizeOfCreateOptions = - static_cast<uint32_t>(sizeof(MojoCreateSharedBufferOptions)); +const uint32_t kSizeOfCreateOptions = sizeof(MojoCreateSharedBufferOptions); // Does a cursory sanity check of |validated_options|. Calls // |ValidateCreateOptions()| on already-validated options. The validated options @@ -179,7 +178,7 @@ TEST(SharedBufferDispatcherTest, DuplicateBufferHandleOptionsValid) { MojoDuplicateBufferHandleOptions options[] = { {sizeof(MojoDuplicateBufferHandleOptions), MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE}, - {sizeof(MojoDuplicateBufferHandleOptionsFlags), ~0} + {sizeof(MojoDuplicateBufferHandleOptionsFlags), ~0u} }; for (size_t i = 0; i < arraysize(options); i++) { scoped_refptr<Dispatcher> dispatcher2; @@ -214,7 +213,7 @@ TEST(SharedBufferDispatcherTest, DuplicateBufferHandleOptionsInvalid) { // Unknown |flags|. { MojoDuplicateBufferHandleOptions options = { - static_cast<uint32_t>(sizeof(MojoDuplicateBufferHandleOptions)), ~0u + sizeof(MojoDuplicateBufferHandleOptions), ~0u }; scoped_refptr<Dispatcher> dispatcher2; EXPECT_EQ(MOJO_RESULT_UNIMPLEMENTED, |