Some CXX_BUILD fixes

This commit is contained in:
twinaphex 2017-09-22 04:56:58 +02:00
parent 6141761e63
commit 848fe719fb

View File

@ -226,7 +226,7 @@ static FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
FLAC__BitReader *FLAC__bitreader_new(void)
{
FLAC__BitReader *br = calloc(1, sizeof(FLAC__BitReader));
FLAC__BitReader *br = (FLAC__BitReader*)calloc(1, sizeof(FLAC__BitReader));
/* calloc() implies:
memset(br, 0, sizeof(FLAC__BitReader));
@ -258,10 +258,10 @@ FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback
{
FLAC__ASSERT(0 != br);
br->words = br->bytes = 0;
br->words = br->bytes = 0;
br->consumed_words = br->consumed_bits = 0;
br->capacity = FLAC__BITREADER_DEFAULT_CAPACITY;
br->buffer = malloc(sizeof(brword) * br->capacity);
br->capacity = FLAC__BITREADER_DEFAULT_CAPACITY;
br->buffer = (brword*)malloc(sizeof(brword) * br->capacity);
if(br->buffer == 0)
return false;
br->read_callback = rcb;