From cc719183cbc1fb6d2aebeb3150780d5c0e3f86e5 Mon Sep 17 00:00:00 2001 From: Q Date: Thu, 27 Mar 2014 09:48:26 +0000 Subject: add VC2012 project to compile static and dynamic lib, also fix some C issues --- src/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/init.c') diff --git a/src/init.c b/src/init.c index a65e33a..f7962fa 100644 --- a/src/init.c +++ b/src/init.c @@ -43,7 +43,7 @@ #ifdef USE_OOURA void xtract_init_ooura_data(xtract_ooura_data *ooura_data, unsigned int N) { - ooura_data->ooura_ip = (int *)calloc(2 + sqrt(N), sizeof(int)); + ooura_data->ooura_ip = (int *)calloc(2 + sqrt((double)N), sizeof(int)); ooura_data->ooura_w = (double *)calloc(N * 5 / 4, sizeof(double)); ooura_data->initialised = true; } @@ -397,7 +397,7 @@ double *xtract_init_window(const int N, const int type) { double *window; - window = malloc(N * sizeof(double)); + window = (double*)malloc(N * sizeof(double)); switch (type) { @@ -444,7 +444,7 @@ void xtract_free_window(double *window) #ifdef __GNUC__ __attribute__((constructor)) void init() #else -void _init()ยท +void _init() #endif { #ifdef USE_OOURA -- cgit v1.2.3