diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 21:34:53 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 21:34:53 +0000 |
commit | 999d37e07ca81e0821930616a2417b8ea8a33d37 (patch) | |
tree | d64645cfa9afb698c662096bd9fac94ac6a127db /base/process_util_unittest.cc | |
parent | a7150972720d10eb13ec1461dcdd0836b86b2586 (diff) | |
download | chromium_src-999d37e07ca81e0821930616a2417b8ea8a33d37.zip chromium_src-999d37e07ca81e0821930616a2417b8ea8a33d37.tar.gz chromium_src-999d37e07ca81e0821930616a2417b8ea8a33d37.tar.bz2 |
linux: fix a warning in the process_util unittest
Original review: http://codereview.chromium.org/422003
BUG=none
TEST=compiles on gcc 4.4
Review URL: http://codereview.chromium.org/431034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r-- | base/process_util_unittest.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index a247560..3f53f2a 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -17,6 +17,7 @@ #if defined(OS_LINUX) #include <dlfcn.h> +#include <errno.h> #include <malloc.h> #endif #if defined(OS_POSIX) @@ -415,10 +416,10 @@ TEST_F(OutOfMemoryTest, Memalign) { } TEST_F(OutOfMemoryTest, Posix_memalign) { - // The (void) is to prevent a gcc warning about unused return values. - // We don't actually care about the return value, since we're - // asserting death. - ASSERT_DEATH((void) posix_memalign(&value_, 8, test_size_), ""); + // Grab the return value of posix_memalign to silence a compiler warning + // about unused return values. We don't actually care about the return + // value, since we're asserting death. + ASSERT_DEATH(EXPECT_EQ(ENOMEM, posix_memalign(&value_, 8, test_size_)), ""); } extern "C" { |