From 83ebd0719e48b0e75f8110f0c8db61052f71a8d0 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 1 May 2018 22:14:14 +0000 Subject: [PATCH] fixed some warnings, thanks Danilo git-svn-id: https://svn.code.sf.net/p/freetel/code@3551 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/codec2_fft.c | 2 +- codec2-dev/src/freedv_api.c | 6 +++--- codec2-dev/src/mpdecode_core.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/codec2-dev/src/codec2_fft.c b/codec2-dev/src/codec2_fft.c index e91ff2a5..b8bd3630 100644 --- a/codec2-dev/src/codec2_fft.c +++ b/codec2-dev/src/codec2_fft.c @@ -148,7 +148,7 @@ void codec2_fft_inplace(codec2_fft_cfg cfg, codec2_fft_cpx* inout) arm_cfft_f32(cfg->instance,(float*)inout,cfg->inverse,1); if (cfg->inverse) { - arm_scale_f32(inout,cfg->instance->fftLen,inout,cfg->instance->fftLen*2); + arm_scale_f32((float*)inout,cfg->instance->fftLen,(float*)inout,cfg->instance->fftLen*2); } #endif diff --git a/codec2-dev/src/freedv_api.c b/codec2-dev/src/freedv_api.c index 592a0c65..d619687f 100644 --- a/codec2-dev/src/freedv_api.c +++ b/codec2-dev/src/freedv_api.c @@ -95,7 +95,7 @@ struct freedv *freedv_open(int mode) { struct freedv *freedv_open_advanced(int mode, struct freedv_advanced *adv) { struct freedv *f; - int Nc, codec2_mode, nbit, nbyte,i; + int Nc, codec2_mode, nbit, nbyte; if ((mode != FREEDV_MODE_1600) && (mode != FREEDV_MODE_700) && (mode != FREEDV_MODE_700B) && (mode != FREEDV_MODE_2400A) && @@ -204,7 +204,7 @@ struct freedv *freedv_open_advanced(int mode, struct freedv_advanced *adv) { if (f->codeword_symbols == NULL) {return NULL;} f->codeword_amps = (float*)malloc(sizeof(float)*f->interleave_frames*coded_syms_per_frame); if (f->codeword_amps == NULL) {return NULL;} - for (i=0; iinterleave_frames*coded_syms_per_frame; i++) { + for (int i=0; iinterleave_frames*coded_syms_per_frame; i++) { f->codeword_symbols[i].real = 0.0; f->codeword_symbols[i].imag = 0.0; f->codeword_amps[i] = 0.0; @@ -222,7 +222,7 @@ struct freedv *freedv_open_advanced(int mode, struct freedv_advanced *adv) { f->mod_out = (COMP*)malloc(sizeof(COMP)*f->interleave_frames*f->n_nat_modem_samples); if (f->mod_out == NULL) { return NULL; } - for (i=0; iinterleave_frames*f->n_nat_modem_samples; i++) { + for (int i=0; iinterleave_frames*f->n_nat_modem_samples; i++) { f->mod_out[i].real = 0.0; f->mod_out[i].imag = 0.0; } diff --git a/codec2-dev/src/mpdecode_core.c b/codec2-dev/src/mpdecode_core.c index e7afa4a7..02478def 100644 --- a/codec2-dev/src/mpdecode_core.c +++ b/codec2-dev/src/mpdecode_core.c @@ -821,11 +821,11 @@ void Somap(double bit_likelihood[], /* number_bits, bps*number_symbols */ for (i=0;i> 1; } - mask = 1 << bps - 1; + mask = 1 << (bps - 1); for (k=0;k