(Resamplers) Some C89 build fixes

This commit is contained in:
twinaphex 2014-10-03 22:52:35 +02:00
parent 6214e8e211
commit 96834c8795
2 changed files with 6 additions and 4 deletions

View File

@ -68,7 +68,7 @@ typedef struct rarch_CC_resampler
static void *memalign_alloc__(size_t boundary, size_t size)
{
uintptr_t addr;
uintptr_t addr = 0;
void **place;
void *ptr = malloc(boundary + size + sizeof(uintptr_t));
if (!ptr)
@ -540,7 +540,8 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
static void resampler_CC_process(void *re_, struct resampler_data *data)
{
rarch_CC_resampler_t *re = (rarch_CC_resampler_t*)re_;
re->process(re_, data);
if (re)
re->process(re_, data);
}
static void resampler_CC_free(void *re_)

View File

@ -202,6 +202,7 @@ static void init_sinc_table(rarch_sinc_resampler_t *resamp, double cutoff,
if (calculate_delta)
{
int phase;
for (p = 0; p < phases - 1; p++)
{
for (j = 0; j < taps; j++)
@ -212,7 +213,7 @@ static void init_sinc_table(rarch_sinc_resampler_t *resamp, double cutoff,
}
}
int phase = phases - 1;
phase = phases - 1;
for (j = 0; j < taps; j++)
{
float val, delta;
@ -233,8 +234,8 @@ static void init_sinc_table(rarch_sinc_resampler_t *resamp, double cutoff,
/* No memalign() for us on Win32 ... */
static void *aligned_alloc__(size_t boundary, size_t size)
{
uintptr_t addr;
void **place;
uintptr_t addr = 0;
void *ptr = malloc(boundary + size + sizeof(uintptr_t));
if (!ptr)