aboutsummaryrefslogtreecommitdiff
path: root/shm.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-07 19:55:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-07 19:55:41 +0000
commit42ba135dcbf905a1e3b589c1012cfc946ad28d42 (patch)
tree265282027801e799b9a4a3afba074c868689b49e /shm.c
parentMerge branch 'syslog' into master (diff)
parentReplace GCC "unused" and "format" attributes with portable macros (diff)
Merge branch 'attrs' into master
Diffstat (limited to 'shm.c')
-rw-r--r--shm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shm.c b/shm.c
index 260694f6..317bc9c9 100644
--- a/shm.c
+++ b/shm.c
@@ -22,6 +22,7 @@
#define LOG_MODULE "shm"
#define LOG_ENABLE_DBG 0
#include "log.h"
+#include "macros.h"
#define TIME_SCROLL 0
@@ -398,7 +399,7 @@ static bool
wrap_buffer(struct wl_shm *shm, struct buffer *buf, off_t new_offset)
{
/* We don't allow overlapping offsets */
- off_t diff __attribute__((unused)) =
+ off_t UNUSED diff =
new_offset < buf->offset ? buf->offset - new_offset : new_offset - buf->offset;
assert(diff > buf->size);