test: logging: fix compilation on Chromium OS

Commit a25c937f8a ("test: add logging API test") causes the build to
fail in the Chromium OS build environment, because the return value of a
function call marked with the __warn_unused_result__ attribute is ignored.
Fix this.

Fixes: a25c937f8a ("test: add logging API test")
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Paul Elder 2019-07-12 17:25:59 +09:00
parent df23ab95f3
commit b5cffad2d4

View file

@ -59,7 +59,10 @@ protected:
char buf[1000];
memset(buf, 0, sizeof(buf));
lseek(fd, 0, SEEK_SET);
read(fd, buf, sizeof(buf));
if (read(fd, buf, sizeof(buf)) < 0) {
cerr << "Failed to read tmp log file" << endl;
return TestFail;
}
close(fd);
std::list<int> goodList = { 1, 3, 5 };