summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2011-08-29 16:31:52 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-08-29 16:31:52 -0400
commit0abd1b0dea2ed9c771597549caf7ad4482150a8c (patch)
treeaaf8f858b53597b9ef2104ff22514b5bd8251d60
parentebec87a287c6c18058a1fc843b51091b9044e672 (diff)
downloadopus-0abd1b0dea2ed9c771597549caf7ad4482150a8c.tar.gz
Makes the allocation more C++-friendly
-rw-r--r--libcelt/tests/ectest.c2
-rw-r--r--libcelt/tests/laplace-test.c2
-rw-r--r--src/opus_multistream.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/libcelt/tests/ectest.c b/libcelt/tests/ectest.c
index 9f94bace..7ebcf276 100644
--- a/libcelt/tests/ectest.c
+++ b/libcelt/tests/ectest.c
@@ -46,7 +46,7 @@ int main(int _argc,char **_argv){
else
seed = time(NULL);
/*Testing encoding of raw bit values.*/
- ptr = malloc(DATA_SIZE);
+ ptr = (unsigned char *)malloc(DATA_SIZE);
ec_enc_init(&enc,ptr, DATA_SIZE);
for(ft=2;ft<1024;ft++){
for(i=0;i<ft;i++){
diff --git a/libcelt/tests/laplace-test.c b/libcelt/tests/laplace-test.c
index fd07cd24..222bc693 100644
--- a/libcelt/tests/laplace-test.c
+++ b/libcelt/tests/laplace-test.c
@@ -31,7 +31,7 @@ int main(void)
unsigned char *ptr;
int val[10000], decay[10000];
ALLOC_STACK;
- ptr = malloc(DATA_SIZE);
+ ptr = (unsigned char *)malloc(DATA_SIZE);
ec_enc_init(&enc,ptr,DATA_SIZE);
val[0] = 3; decay[0] = 6000;
diff --git a/src/opus_multistream.c b/src/opus_multistream.c
index da498dd6..697cf5b1 100644
--- a/src/opus_multistream.c
+++ b/src/opus_multistream.c
@@ -201,7 +201,7 @@ OpusMSEncoder *opus_multistream_encoder_create(
)
{
int ret;
- OpusMSEncoder *st = opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams));
+ OpusMSEncoder *st = (OpusMSEncoder *)opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams));
if (st==NULL)
{
if (error)
@@ -510,7 +510,7 @@ OpusMSDecoder *opus_multistream_decoder_create(
)
{
int ret;
- OpusMSDecoder *st = opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams));
+ OpusMSDecoder *st = (OpusMSDecoder *)opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams));
if (st==NULL)
{
if (error)