From f8344fda16a574ac0753e03445da49c0418df349 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 26 Jul 2020 13:47:40 +0000 Subject: [PATCH] main: Suppress unused variable warnings in release build --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index d5c3a10..5ec45e3 100644 --- a/src/main.c +++ b/src/main.c @@ -58,6 +58,8 @@ #define DEFAULT_ADDRESS "127.0.0.1" #define DEFAULT_PORT 5900 +#define MAYBE_UNUSED __attribute__((unused)) + struct wayvnc { bool do_exit; @@ -338,7 +340,7 @@ void on_wayland_event(void* obj) { struct wayvnc* self = aml_get_userdata(obj); - int rc = wl_display_prepare_read(self->display); + int rc MAYBE_UNUSED = wl_display_prepare_read(self->display); assert(rc == 0); if (wl_display_read_events(self->display) < 0) {