Skip to content

Commit

Permalink
Merge pull request #3169 from kolyshkin/1.0-fix-cc-warn
Browse files Browse the repository at this point in the history
[1.0] libct/nsenter: fix unused-result warning
  • Loading branch information
Mrunal Patel committed Aug 18, 2021
2 parents 62f38ad + 13b45cb commit 9c4d5c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libcontainer/nsenter/nsexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ static void write_log(const char *level, const char *format, ...)
goto out;
}

write(logfd, json, ret);
/* This logging is on a best-effort basis. In case of a short or failed
* write there is nothing we can do, so just ignore write() errors.
*/
ssize_t __attribute__((unused)) __res = write(logfd, json, ret);

out:
free(message);
Expand Down

0 comments on commit 9c4d5c6

Please sign in to comment.