fix a few long-standing compilation warnings
This commit is contained in:
parent
21f8130f0d
commit
562153d09e
|
@ -22,6 +22,9 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __plan9__
|
||||||
|
#define USED(x) (void)(x)
|
||||||
|
#endif
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
@ -157,12 +160,12 @@ audio_callback(void *u, Uint8 *stream, int len)
|
||||||
{
|
{
|
||||||
int instance, running = 0;
|
int instance, running = 0;
|
||||||
Sint16 *samples = (Sint16 *)stream;
|
Sint16 *samples = (Sint16 *)stream;
|
||||||
|
USED(u);
|
||||||
SDL_memset(stream, 0, len);
|
SDL_memset(stream, 0, len);
|
||||||
for(instance = 0; instance < POLYPHONY; instance++)
|
for(instance = 0; instance < POLYPHONY; instance++)
|
||||||
running += audio_render(instance, samples, samples + len / 2);
|
running += audio_render(instance, samples, samples + len / 2);
|
||||||
if(!running)
|
if(!running)
|
||||||
SDL_PauseAudioDevice(audio_id, 1);
|
SDL_PauseAudioDevice(audio_id, 1);
|
||||||
(void)u;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -177,11 +180,11 @@ static int
|
||||||
stdin_handler(void *p)
|
stdin_handler(void *p)
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
USED(p);
|
||||||
event.type = stdin_event;
|
event.type = stdin_event;
|
||||||
while(read(0, &event.cbutton.button, 1) > 0 && SDL_PushEvent(&event) >= 0)
|
while(read(0, &event.cbutton.button, 1) > 0 && SDL_PushEvent(&event) >= 0)
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
(void)p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -465,7 +468,6 @@ run(Uxn *u)
|
||||||
} else
|
} else
|
||||||
SDL_WaitEvent(NULL);
|
SDL_WaitEvent(NULL);
|
||||||
}
|
}
|
||||||
return error("SDL_WaitEvent", SDL_GetError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue