aboutsummaryrefslogtreecommitdiff
path: root/shm.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2020-08-07 19:42:34 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2020-08-07 19:42:34 +0000
commit7eb70a453b4ea797d9e85017c6deab6a7bc903a6 (patch)
tree265282027801e799b9a4a3afba074c868689b49e /shm.c
parentMerge branch 'syslog' into master (diff)
Replace GCC "unused" and "format" attributes with portable macros
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);