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

Unified Diff: base/message_loop_unittest.cc

Issue 2805026: Clang: Do not ignore result of HANDLE_EINTR. (Closed)
Patch Set: '' Created 10 years, 6 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
Index: base/message_loop_unittest.cc
diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc
index 6208e993edc1af94589efb5652206f9961441104..da0013c250068d4fae801d50e35f3f9dbd937310 100644
--- a/base/message_loop_unittest.cc
+++ b/base/message_loop_unittest.cc
@@ -1578,8 +1578,10 @@ TEST(MessageLoopTest, FileDescriptorWatcherOutlivesMessageLoop) {
// and don't run the message loop, just destroy it.
}
}
- HANDLE_EINTR(close(pipefds[0]));
- HANDLE_EINTR(close(pipefds[1]));
+ if (HANDLE_EINTR(close(pipefds[0])) < 0)
+ PLOG(ERROR) << "close";
+ if (HANDLE_EINTR(close(pipefds[1])) < 0)
+ PLOG(ERROR) << "close";
}
TEST(MessageLoopTest, FileDescriptorWatcherDoubleStop) {
@@ -1601,8 +1603,10 @@ TEST(MessageLoopTest, FileDescriptorWatcherDoubleStop) {
controller.StopWatchingFileDescriptor();
}
}
- HANDLE_EINTR(close(pipefds[0]));
- HANDLE_EINTR(close(pipefds[1]));
+ if (HANDLE_EINTR(close(pipefds[0])) < 0)
+ PLOG(ERROR) << "close";
+ if (HANDLE_EINTR(close(pipefds[1])) < 0)
+ PLOG(ERROR) << "close";
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698