fixed some warnings, thanks Danilo
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 1 May 2018 22:14:14 +0000 (22:14 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 1 May 2018 22:14:14 +0000 (22:14 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3551 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/codec2_fft.c
codec2-dev/src/freedv_api.c
codec2-dev/src/mpdecode_core.c

index e91ff2a5d16f45ae6ccf74c44eb0239682fdfb70..b8bd36308eabd4996f8b32ddc70c58e8d3a23b31 100644 (file)
@@ -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
index 592a0c65ee5fe99e64b29fe077e7721e14d08281..d619687f1016c208c80f92fdef74c6767201817f 100644 (file)
@@ -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; i<f->interleave_frames*coded_syms_per_frame; i++) {
+        for (int i=0; i<f->interleave_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; i<f->interleave_frames*f->n_nat_modem_samples; i++) {
+        for (int i=0; i<f->interleave_frames*f->n_nat_modem_samples; i++) {
             f->mod_out[i].real = 0.0;
             f->mod_out[i].imag = 0.0;
         }
index e7afa4a7ccf871f8737d4931befc3feff7bcaa57..02478def7414547ab0851cbf97f94f2a0304921d 100644 (file)
@@ -821,11 +821,11 @@ void Somap(double  bit_likelihood[],      /* number_bits, bps*number_symbols */
         for (i=0;i<M;i++) {
             metric =  symbol_likelihood[n*M+i]; /* channel metric for this symbol */
 
-            mask = 1 << bps - 1;
+            mask = 1 << (bps - 1);
             for (j=0;j<bps;j++) {      
                 mask = mask >> 1;
             }
-            mask = 1 << bps - 1;
+            mask = 1 << (bps - 1);
             
             for (k=0;k<bps;k++) {      /* loop over bits */
                 if (mask&i) {