From b93661508e6443559aa5e203e8f632a62ba5ba7d Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 21 Aug 2012 23:49:30 +0100 Subject: [PATCH] Fix more Linux warnings/errors. (I'm away from the VM I would normally use to test such things before pushing, apologies for the churn) --- simgear/sound/openal_test1.cxx | 1 + simgear/sound/readwav.cxx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/sound/openal_test1.cxx b/simgear/sound/openal_test1.cxx index 60aba9f8..7909f2cd 100644 --- a/simgear/sound/openal_test1.cxx +++ b/simgear/sound/openal_test1.cxx @@ -1,4 +1,5 @@ #include +#include // EXIT_FAILURE #ifdef _WIN32 #include diff --git a/simgear/sound/readwav.cxx b/simgear/sound/readwav.cxx index 84fd81b9..3afd61b3 100644 --- a/simgear/sound/readwav.cxx +++ b/simgear/sound/readwav.cxx @@ -109,11 +109,10 @@ int16_t mulaw2linear (uint8_t mulawbyte) uint8_t *d = (uint8_t *) b->data; size_t newLength = b->length * 2; int16_t *buf = (int16_t *) malloc(newLength); - size_t i; if (buf == NULL) throw sg_exception("malloc failed decoing ULaw WAV file"); - for (i = 0; i < b->length; i++) { + for (ALsizei i = 0; i < b->length; i++) { buf[i] = mulaw2linear(d[i]); } -- 2.39.5