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

Unified Diff: base/process_util_unittest.cc

Issue 27038: Fix more GCC 4.3 warnings. (Closed)
Patch Set: Created 11 years, 10 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/process_util_unittest.cc
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 97ba756d92a46b47d8c0442100f8e5bf13ac2bcf..73b854bc9ba81b9b5cbbf6c247164521db04084e 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -181,7 +181,8 @@ MULTIPROCESS_TEST_MAIN(ProcessUtilsLeakFDChildProcess) {
#endif // defined(OS_LINUX)
num_open_files -= expected_num_open_fds;
- write(write_pipe, &num_open_files, sizeof(num_open_files));
+ int written = write(write_pipe, &num_open_files, sizeof(num_open_files));
agl 2009/02/22 01:25:35 ssize_t, not int
+ DCHECK(written == sizeof(num_open_files));
agl 2009/02/22 01:25:35 DCHECK_EQ
close(write_pipe);
return 0;
@@ -190,7 +191,8 @@ MULTIPROCESS_TEST_MAIN(ProcessUtilsLeakFDChildProcess) {
TEST_F(ProcessUtilTest, FDRemapping) {
// Open some files to check they don't get leaked to the child process.
int fds[2];
- pipe(fds);
+ if (pipe(fds) < 0)
+ NOTREACHED();
int pipe_read_fd = fds[0];
int pipe_write_fd = fds[1];

Powered by Google App Engine
This is Rietveld 408576698