initialize ampl_out to avoid it containing garbage
static analysis from clang scan-build detected some paths in the call to fsk_frame_analyze where ampl_out is not being set: fsk.c:493:13: warning: Assigned value is garbage or undefined best_a = ampl_out; ..probably the sanest approach here is to initialize it to 0.0 just to avoid it being garbage rather than setting it to zero in the failed error paths in fsk_frame_analyze. Signed-off-by: Colin Ian King <colin.king@canonical.com>
This commit is contained in:
parent
d68cdbc996
commit
22c0c6d2bf
|
@ -481,7 +481,7 @@ fsk_find_frame( fsk_plan *fskp, float *samples, unsigned int frame_nsamples,
|
||||||
if ( t < 0 )
|
if ( t < 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float c, ampl_out;
|
float c, ampl_out = 0.0;
|
||||||
unsigned long long bits_out = 0;
|
unsigned long long bits_out = 0;
|
||||||
debug_log("try fsk_frame_analyze at t=%d\n", t);
|
debug_log("try fsk_frame_analyze at t=%d\n", t);
|
||||||
c = fsk_frame_analyze(fskp, samples+t, samples_per_bit,
|
c = fsk_frame_analyze(fskp, samples+t, samples_per_bit,
|
||||||
|
|
Loading…
Reference in New Issue