Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1891)

Unified Diff: device/hid/hid_connection_unittest.cc

Issue 664983002: [gcc 4.x] Fix the build failure due to -Werror=char-subscripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection_unittest.cc
diff --git a/device/hid/hid_connection_unittest.cc b/device/hid/hid_connection_unittest.cc
index 5e48ef9bc5ba11e95ab94bb7ca8dfc83f41471c2..3607bf237e037905e3ae47b034327cde8a245629 100644
--- a/device/hid/hid_connection_unittest.cc
+++ b/device/hid/hid_connection_unittest.cc
@@ -162,7 +162,7 @@ TEST_F(HidConnectionTest, ReadWrite) {
for (char i = 0; i < 8; ++i) {
scoped_refptr<IOBufferWithSize> buffer(new IOBufferWithSize(kBufferSize));
buffer->data()[0] = 0;
- for (char j = 1; j < kBufferSize; ++j) {
+ for (unsigned char j = 1; j < kBufferSize; ++j) {
buffer->data()[j] = i + j - 1;
}
@@ -175,7 +175,7 @@ TEST_F(HidConnectionTest, ReadWrite) {
ASSERT_TRUE(read_callback.WaitForResult());
ASSERT_EQ(9UL, read_callback.size());
ASSERT_EQ(0, read_callback.buffer()->data()[0]);
- for (char j = 1; j < kBufferSize; ++j) {
+ for (unsigned char j = 1; j < kBufferSize; ++j) {
ASSERT_EQ(i + j - 1, read_callback.buffer()->data()[j]);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698