From 562153d09ec4b3454836165cc17c51ff4871160c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Mon, 20 Mar 2023 16:58:09 +0100 Subject: [PATCH] fix a few long-standing compilation warnings --- src/uxnemu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index fbbf8e2..548c50b 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -22,6 +22,9 @@ #include #include #endif +#ifndef __plan9__ +#define USED(x) (void)(x) +#endif #pragma GCC diagnostic pop #pragma clang diagnostic pop @@ -157,12 +160,12 @@ audio_callback(void *u, Uint8 *stream, int len) { int instance, running = 0; Sint16 *samples = (Sint16 *)stream; + USED(u); SDL_memset(stream, 0, len); for(instance = 0; instance < POLYPHONY; instance++) running += audio_render(instance, samples, samples + len / 2); if(!running) SDL_PauseAudioDevice(audio_id, 1); - (void)u; } void @@ -177,11 +180,11 @@ static int stdin_handler(void *p) { SDL_Event event; + USED(p); event.type = stdin_event; while(read(0, &event.cbutton.button, 1) > 0 && SDL_PushEvent(&event) >= 0) ; return 0; - (void)p; } static void @@ -465,7 +468,6 @@ run(Uxn *u) } else SDL_WaitEvent(NULL); } - return error("SDL_WaitEvent", SDL_GetError()); } int