aboutsummaryrefslogtreecommitdiff
path: root/shm.c
diff options
context:
space:
mode:
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);