Replace GCC "unused" and "format" attributes with portable macros

This commit is contained in:
Craig Barnes 2020-08-07 20:42:34 +01:00
parent f952d5a305
commit 7eb70a453b
7 changed files with 18 additions and 10 deletions

3
shm.c
View file

@ -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);