bar/wayland: Add unused attribute to count

This variable is only used in LOG_DBG which expands to nothing by
default. Adding the unused attribute prevents the compiler from throwing
an error (-Wunused-but-set-variable) when building.
This commit is contained in:
Nicholas Sudsgaard 2025-03-04 13:42:11 +09:00 committed by Daniel Eklöf
parent b486088f77
commit 5a515eae99
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1223,7 +1223,7 @@ loop(struct bar *_bar, void (*expose)(const struct bar *bar),
bool do_expose = false; bool do_expose = false;
/* Coalesce “refresh” commands */ /* Coalesce “refresh” commands */
size_t count = 0; __attribute__((unused)) size_t count = 0;
while (true) { while (true) {
uint8_t command; uint8_t command;
ssize_t r = read(backend->pipe_fds[0], &command, sizeof(command)); ssize_t r = read(backend->pipe_fds[0], &command, sizeof(command));