Skip to content

Commit

Permalink
util: fix unused result warning on poky
Browse files Browse the repository at this point in the history
  • Loading branch information
alerei committed Apr 3, 2024
1 parent 88422a8 commit 744215c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flecs/util/process/src/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ std::string process_t::output(int fd) const noexcept
lseek(fd, 0, SEEK_SET);

std::string str(len, '\0');
read(fd, str.data(), len);
return str;
const auto res = read(fd, str.data(), len);
return (res != -1) ? str : std::string{};
}

int process_t::do_spawn(const char* exec, bool path)
Expand Down

0 comments on commit 744215c

Please # to comment.