shithub: opus

Download patch

ref: e046c18acf3307d6c05a703e5485606b83912f54
parent: e995c31f443b1a03ca0fcc80c6cff28d522c25c1
author: Jean-Marc Valin <[email protected]>
date: Tue Feb 26 08:51:53 EST 2008

Minus a bunch of warnings when enabling alloca()

--- a/libcelt/stack_alloc.h
+++ b/libcelt/stack_alloc.h
@@ -105,7 +105,7 @@
 #define ALLOC(var, size, type) type var[size]
 #elif defined(USE_ALLOCA)
 #define VARDECL(var) var
-#define ALLOC(var, size, type) var = alloca(sizeof(type)*(size))
+#define ALLOC(var, size, type) var = ((type*)alloca(sizeof(type)*(size)))
 #else
 /*#define VARDECL(var) var
 #define ALLOC(var, size, type) var = PUSH(stack, size, type)*/