diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-23 04:07:56 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-23 04:07:56 +0000 |
commit | f4434b2ad164700510dc811f1e9bb30ea2c26bf9 (patch) | |
tree | 1060e7e8b2dc2346e8705456a22a799dbdb9f831 | |
parent | 9e19aea882faeea78ce46911f201c5eac8e7c74d (diff) | |
download | chromium_src-f4434b2ad164700510dc811f1e9bb30ea2c26bf9.zip chromium_src-f4434b2ad164700510dc811f1e9bb30ea2c26bf9.tar.gz chromium_src-f4434b2ad164700510dc811f1e9bb30ea2c26bf9.tar.bz2 |
Fix more GCC 4.3 warnings.
Review URL: http://codereview.chromium.org/27038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10170 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/process_util_unittest.cc | 6 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 97ba756..c3bcea9 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)); + ssize_t written = write(write_pipe, &num_open_files, sizeof(num_open_files)); + DCHECK_EQ(written, sizeof(num_open_files)); 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]; diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index df8b40c..fee079e 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -557,7 +557,8 @@ static bool testPostURLFile(PluginObject* obj, const NPVariant* args, uint32_t a if (!tempFile) return false; - fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile); + ssize_t written = fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile); + DCHECK_EQ(written, 1); fclose(tempFile); NPError error = browser->posturl(obj->npp, url, target, pathString.UTF8Length, path, TRUE); |