summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoragoode@chromium.org <agoode@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 22:30:32 +0000
committeragoode@chromium.org <agoode@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 22:30:32 +0000
commit77715299cf16da78d0026ea0261b2938b590a1f8 (patch)
tree97b318b1516ce77cfb4e647c6d0bdecb9664730d /remoting
parente2ea5ca6a89c308af53c5ee6d5d1f61ccb11faf8 (diff)
downloadchromium_src-77715299cf16da78d0026ea0261b2938b590a1f8.zip
chromium_src-77715299cf16da78d0026ea0261b2938b590a1f8.tar.gz
chromium_src-77715299cf16da78d0026ea0261b2938b590a1f8.tar.bz2
Fix "narrowing conversion" errors uncovered in building with gcc 4.8
BUG=340312 Review URL: https://codereview.chromium.org/178613006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/gnubby_auth_handler_posix_unittest.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/remoting/host/gnubby_auth_handler_posix_unittest.cc b/remoting/host/gnubby_auth_handler_posix_unittest.cc
index 60f32c8c..c3a8c9f 100644
--- a/remoting/host/gnubby_auth_handler_posix_unittest.cc
+++ b/remoting/host/gnubby_auth_handler_posix_unittest.cc
@@ -18,7 +18,7 @@ using testing::Return;
namespace {
// Test gnubby request data.
-const char request_data[] = {
+const unsigned char request_data[] = {
0x00, 0x00, 0x00, 0x9a, 0x65, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x90,
0x24, 0x71, 0xf8, 0xf2, 0xe5, 0xdf, 0x7f, 0x81, 0xc7, 0x49, 0xc4, 0xa3,
@@ -109,7 +109,8 @@ TEST_F(GnubbyAuthHandlerPosixTest, DidRead) {
net::StreamListenSocket* socket = new MockStreamListenSocket(delegate_);
delegate_->DidAccept(NULL, make_scoped_ptr(socket));
- delegate_->DidRead(socket, request_data, sizeof(request_data));
+ delegate_->DidRead(socket, reinterpret_cast<const char*>(request_data),
+ sizeof(request_data));
}
TEST_F(GnubbyAuthHandlerPosixTest, DidReadByteByByte) {
@@ -119,7 +120,8 @@ TEST_F(GnubbyAuthHandlerPosixTest, DidReadByteByByte) {
delegate_->DidAccept(NULL, make_scoped_ptr(socket));
for (unsigned int i = 0; i < sizeof(request_data); ++i) {
- delegate_->DidRead(socket, request_data + i, 1);
+ delegate_->DidRead(socket,
+ reinterpret_cast<const char *>(request_data + i), 1);
}
}