Commit 85812812 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix base_unittests compilation failure on official build bots.

On some official build bots, r531606 causes a -Wunused-result error.

BUG=805615

Change-Id: I0f4f51a6eb07d67f3b4c552af7d5f115b5852095
Reviewed-on: https://chromium-review.googlesource.com/884505
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531707}
parent 20fb8351
...@@ -33,8 +33,10 @@ TEST(DirReaderPosixUnittest, Read) { ...@@ -33,8 +33,10 @@ TEST(DirReaderPosixUnittest, Read) {
ASSERT_TRUE(dir); ASSERT_TRUE(dir);
char wdbuf[PATH_MAX]; char wdbuf[PATH_MAX];
getcwd(wdbuf, PATH_MAX); if (getcwd(wdbuf, PATH_MAX))
LOG(ERROR) << "Current directory: " << wdbuf; LOG(ERROR) << "Current directory: " << wdbuf;
else
PLOG(ERROR) << "getcwd() failed with ";
const int prev_wd = open(".", O_RDONLY | O_DIRECTORY); const int prev_wd = open(".", O_RDONLY | O_DIRECTORY);
PLOG_IF(ERROR, prev_wd < 0) << "opening . failed with "; PLOG_IF(ERROR, prev_wd < 0) << "opening . failed with ";
DCHECK_GE(prev_wd, 0); DCHECK_GE(prev_wd, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment