Fixed several compiler warnings
[lcr.git] / ss5_decode.c
index 35e2664..713f818 100644 (file)
@@ -58,7 +58,10 @@ char ss5_decode(unsigned char *data, int len)
        signed long sk, sk1, sk2, low, high;
        int k, n, i;
        int f1 = 0, f2 = 0;
-       double result[NCOEFF], power, noise, snr;
+       double result[NCOEFF], power, noise;
+#ifdef DEBUG_LEVELS
+       double snr;
+#endif
        signed long long cos2pik_;
        char digit = ' ';
 
@@ -121,21 +124,27 @@ char ss5_decode(unsigned char *data, int len)
                }
        }
 
+#ifdef DEBUG_LEVELS
        snr = 0;
+#endif
        /* check one frequency */
        if (result[f1] > TONE_MIN_DB /* must be at least -17 db */
         && result[f1]*SNR > noise) { /*  */
                digit = decode_one[f1];
+#ifdef DEBUG_LEVELS
                if (digit != ' ')
                        snr = result[f1] / noise;
+#endif
        }
        /* check two frequencies */
        if (result[f1] > TONE_MIN_DB && result[f2] > TONE_MIN_DB /* must be at lease -17 db */
         && result[f1]*TONE_DIFF_DB <= result[f2] /* f2 must be not less than 5 db below f1 */
         && (result[f1]+result[f2])*SNR > noise) { /* */
                digit = decode_two[f1][f2];
+#ifdef DEBUG_LEVELS
                if (digit != ' ')
                        snr = (result[f1]+result[f2]) / noise;
+#endif
        }
 
        /* debug powers */