diff options
author | Colin Walters <walters@verbum.org> | 2017-03-28 13:19:43 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-03-29 06:30:28 +0000 |
commit | 6ef45aae778b6ce68c39d97089479fdfe6b441b3 (patch) | |
tree | 63dc6aadc951f61482e3582534fdc936d4d3ef90 | |
parent | b8e6e1159e63045679ae57b8b379b39eae7798a6 (diff) | |
download | bubblewrap-6ef45aae778b6ce68c39d97089479fdfe6b441b3.tar.gz |
main: Squash a -Wunused-result error, enable FORTIFY_SOURCE in CI
This apparently only is emitted with `CFLAGS='-O2 -Wp,-D_FORTIFY_SOURCE=2'`,
which is used by RPM builds in Fedora at least. Enable that by default.
Note that I fixed it by using `TEMP_FAILURE_RETRY`, which should also ensure
that we don't spuriously continue if the `read` was interrupted by `EINTR` for
some reason.
Closes: #190
Approved by: alexlarsson
-rw-r--r-- | .redhat-ci.yml | 4 | ||||
-rw-r--r-- | bubblewrap.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/.redhat-ci.yml b/.redhat-ci.yml index d309d2a..81fda47 100644 --- a/.redhat-ci.yml +++ b/.redhat-ci.yml @@ -18,8 +18,8 @@ timeout: 30m inherit: true -context: f25-asan-ubsan +context: f25-sanitizer required: true tests: - - env CFLAGS='-g -Og -fsanitize=undefined -fsanitize=address' ./ci/redhat-ci.sh fedora:25 + - env CFLAGS='-g -Og -fsanitize=undefined -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2' ./ci/redhat-ci.sh fedora:25 diff --git a/bubblewrap.c b/bubblewrap.c index a8dfd76..5adb0e5 100644 --- a/bubblewrap.c +++ b/bubblewrap.c @@ -2109,7 +2109,7 @@ main (int argc, if (opt_block_fd != -1) { char b[1]; - read (opt_block_fd, b, 1); + (void) TEMP_FAILURE_RETRY (read (opt_block_fd, b, 1)); close (opt_block_fd); } |