commit 562153d09ec4b3454836165cc17c51ff4871160c
parent 21f8130f0dffb1d035e1bcd6edbf34726bdf9e3c
Author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
Date: Mon, 20 Mar 2023 16:58:09 +0100
fix a few long-standing compilation warnings
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -22,6 +22,9 @@
#include <windows.h>
#include <string.h>
#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