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)
This commit is contained in:
James Turner 2012-08-21 23:49:30 +01:00
parent 27ade6c420
commit b93661508e
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <cstdlib> // EXIT_FAILURE
#ifdef _WIN32
#include <windows.h>

View 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]);
}