]> git.mxchange.org Git - simgear.git/commitdiff
Fix more Linux warnings/errors.
authorJames Turner <zakalawe@mac.com>
Tue, 21 Aug 2012 22:49:30 +0000 (23:49 +0100)
committerJames Turner <zakalawe@mac.com>
Tue, 21 Aug 2012 22:49:30 +0000 (23:49 +0100)
(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
simgear/sound/readwav.cxx

index 60aba9f80211b3580a9b42a3abcab828268d7025..7909f2cd3938028f58b35b7062a5c43ba1ba2365 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <cstdlib> // EXIT_FAILURE
 
 #ifdef _WIN32
 #include <windows.h>
index 84fd81b9031dd0b33ca83b3fa5a723c3674c3630..3afd61b3c1003db4fabf4066c12ed933e817759b 100644 (file)
@@ -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]);
     }