Minus a bunch of warnings when enabling alloca()
authorJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Tue, 26 Feb 2008 02:51:53 +0000 (13:51 +1100)
committerJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Tue, 26 Feb 2008 02:51:53 +0000 (13:51 +1100)
libcelt/stack_alloc.h

index 1e643c6..b9b0fa9 100644 (file)
 #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)*/