summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-04-08 12:42:03 +0200
committerColin Walters (automation) <walters+githubbot@verbum.org>2016-04-08 10:45:42 +0000
commitb3298904fcc1fa68616a562b5793085038dd0a34 (patch)
treeddbc3f83c15a88dccc24826ddf8e9f6034a9f4fe /utils.h
parent57ec3c88161a5e06c846fbde05a139afbbcd3fff (diff)
downloadbubblewrap-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index e4d5dff..039546f 100644
--- a/utils.h
+++ b/utils.h
@@ -37,6 +37,8 @@
#define __debug__(x)
#endif
+#define UNUSED __attribute__((__unused__))
+
#define N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
#define TRUE 1