This commit is contained in:
twinaphex 2018-04-09 16:00:44 +02:00
parent e2a68ea96d
commit 5301c91da5
6 changed files with 10 additions and 9 deletions

View file

@ -667,7 +667,7 @@ static void audio_mixer_mix_ogg(float* buffer, size_t num_frames,
int i;
struct resampler_data info;
float temp_buffer[AUDIO_MIXER_TEMP_OGG_BUFFER];
unsigned buf_free = num_frames * 2;
unsigned buf_free = (unsigned)(num_frames * 2);
unsigned temp_samples = 0;
float* pcm = NULL;
@ -740,7 +740,7 @@ static void audio_mixer_mix_mod(float* buffer, size_t num_frames,
float samplef = 0.0f;
int samplei = 0;
unsigned temp_samples = 0;
unsigned buf_free = num_frames * 2;
unsigned buf_free = (unsigned)(num_frames * 2);
int* pcm = NULL;
if (voice->types.mod.position == voice->types.mod.samples)

View file

@ -405,9 +405,10 @@ void *lzma_fast_alloc(void *p, size_t size)
}
/* alloc a new one and put it into the list */
addr = (uint32_t *)malloc(sizeof(uint8_t) * (size + sizeof(uint32_t)));
if (addr==NULL)
addr = (uint32_t *)malloc(sizeof(uint32_t) * (size + sizeof(uint32_t)));
if (!addr)
return NULL;
for (scan = 0; scan < MAX_LZMA_ALLOCS; scan++)
{
if (codec->allocptr[scan] == NULL)

View file

@ -320,14 +320,14 @@ int filestream_putc(RFILE *stream, int c)
int filestream_vprintf(RFILE *stream, const char* format, va_list args)
{
static char buffer[8 * 1024];
int num_chars = vsprintf(buffer, format, args);
int64_t num_chars = vsprintf(buffer, format, args);
if (num_chars < 0)
return -1;
else if (num_chars == 0)
return 0;
return filestream_write(stream, buffer, num_chars);
return (int)filestream_write(stream, buffer, num_chars);
}
int filestream_printf(RFILE *stream, const char* format, ...)

View file

@ -93,7 +93,7 @@ int rfseek(RFILE* stream, long offset, int origin)
break;
}
return filestream_seek(stream, offset, seek_position);
return (int)filestream_seek(stream, (ssize_t)offset, seek_position);
}
size_t rfread(void* buffer,

View file

@ -435,7 +435,7 @@ intfstream_t *intfstream_open_memory(void *data,
info.type = INTFSTREAM_MEMORY;
info.memory.buf.data = (uint8_t*)data;
info.memory.buf.size = size;
info.memory.buf.size = (unsigned)size;
info.memory.writable = false;
fd = (intfstream_t*)intfstream_init(&info);

View file

@ -169,7 +169,7 @@ char *word_wrap(char* buffer, const char *string, int line_width, bool unicode)
}
character = utf8skip(&string[i], 1);
char_len = character - &string[i];
char_len = (unsigned)(character - &string[i]);
if (!unicode)
counter += char_len - 1;