diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-04-08 12:42:03 +0200 |
---|---|---|
committer | Colin Walters (automation) <walters+githubbot@verbum.org> | 2016-04-08 10:45:42 +0000 |
commit | b3298904fcc1fa68616a562b5793085038dd0a34 (patch) | |
tree | ddbc3f83c15a88dccc24826ddf8e9f6034a9f4fe /utils.h | |
parent | 57ec3c88161a5e06c846fbde05a139afbbcd3fff (diff) | |
download | bubblewrap-b3298904fcc1fa68616a562b5793085038dd0a34.tar.gz |
Ignore errors when writing to event_fd in a better way
GCC was failing this because write is marked warn_unused_result.
Assigning it to a attribute unused variable is apparently "better"
than casting it to void...
Also, we avoid taking this path at all if event_fd is -1.
Closes: #32
Approved by: alexlarsson
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -37,6 +37,8 @@ #define __debug__(x) #endif +#define UNUSED __attribute__((__unused__)) + #define N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) #define TRUE 1 |