From: James Turner Date: Tue, 21 Aug 2012 22:49:30 +0000 (+0100) Subject: Fix more Linux warnings/errors. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b93661508e6443559aa5e203e8f632a62ba5ba7d;p=simgear.git 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) --- 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]); }