uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 148dae4ebd37e9936bb4a2aec867383455b9f432
parent e0746c2be765cc9b26b01d05b3b7235ad287fcb2
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Wed, 29 Dec 2021 18:33:23 +0100

fix a few "set and not used" warnings

Diffstat:
Msrc/uxnasm.c | 2+-
Msrc/uxnemu.c | 5++---
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/uxnasm.c b/src/uxnasm.c @@ -236,7 +236,7 @@ doinclude(const char *filename) static int parse(char *w, FILE *f) { - int i = 0; + int i; char word[64], subw[64], c; Macro *m; if(slen(w) >= 63) diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -137,7 +137,6 @@ redraw(Uxn *u) static int init(void) { - SDL_Joystick *gGameController; SDL_AudioSpec as; SDL_zero(as); as.freq = SAMPLE_FREQUENCY; @@ -157,7 +156,7 @@ init(void) audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0); if(!audio_id) error("sdl_audio", SDL_GetError()); - if(SDL_NumJoysticks() > 0 && !(gGameController = SDL_JoystickOpen(0))) + if(SDL_NumJoysticks() > 0 && SDL_JoystickOpen(0) == NULL) error("sdl_joystick", SDL_GetError()); stdin_event = SDL_RegisterEvents(1); audio0_event = SDL_RegisterEvents(POLYPHONY); @@ -429,7 +428,7 @@ run(Uxn *u) redraw(u); while(!devsystem->dat[0xf]) { SDL_Event event; - double elapsed, begin = 0; + double elapsed, begin; if(!BENCH) begin = SDL_GetPerformanceCounter(); while(SDL_PollEvent(&event) != 0) {