1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-03 18:42:56 +00:00

fixing coverity issues

This commit is contained in:
Carles Fernandez 2015-05-15 10:55:46 +02:00
parent 4e2c95d5f5
commit d95a28cea7
11 changed files with 106 additions and 98 deletions

View File

@ -69,6 +69,7 @@ BeamformerFilter::BeamformerFilter(
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str()); file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")"; DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
} }
samples_ = 0;
} }

View File

@ -109,6 +109,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
{ {
LOG(ERROR) << " Unknown input filter input/output item type conversion"; LOG(ERROR) << " Unknown input filter input/output item type conversion";
item_size = sizeof(gr_complex); //avoids uninitialization item_size = sizeof(gr_complex); //avoids uninitialization
input_size_ = sizeof(gr_complex); //avoids uninitialization
} }
if (dump_) if (dump_)

View File

@ -33,10 +33,10 @@
Galileo_Almanac::Galileo_Almanac() Galileo_Almanac::Galileo_Almanac()
{ {
/*Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number*/ /*Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number*/
int IOD_a_7 = 0; IOD_a_7 = 0;
WN_a_7 = 0.0; WN_a_7 = 0.0;
t0a_7 = 0.0; t0a_7 = 0.0;
int SVID1_7 = 0; SVID1_7 = 0;
DELTA_A_7 = 0.0; DELTA_A_7 = 0.0;
e_7 = 0.0; e_7 = 0.0;
omega_7 = 0.0; omega_7 = 0.0;
@ -46,13 +46,13 @@ Galileo_Almanac::Galileo_Almanac()
M0_7 = 0.0; M0_7 = 0.0;
/*Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2)*/ /*Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2)*/
int IOD_a_8 = 0; IOD_a_8 = 0;
af0_8 = 0.0; af0_8 = 0.0;
af1_8 = 0.0; af1_8 = 0.0;
E5b_HS_8 = 0.0; E5b_HS_8 = 0.0;
E1B_HS_8 = 0.0; E1B_HS_8 = 0.0;
E5a_HS_8 = 0.0; E5a_HS_8 = 0.0;
int SVID2_8; SVID2_8 = 0;
DELTA_A_8 = 0.0; DELTA_A_8 = 0.0;
e_8 = 0.0; e_8 = 0.0;
omega_8 = 0.0; omega_8 = 0.0;
@ -61,7 +61,7 @@ Galileo_Almanac::Galileo_Almanac()
Omega_dot_8 = 0.0; Omega_dot_8 = 0.0;
/*Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2)*/ /*Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2)*/
int IOD_a_9 = 0; IOD_a_9 = 0;
WN_a_9 = 0.0; WN_a_9 = 0.0;
t0a_9 = 0.0; t0a_9 = 0.0;
M0_9 = 0.0; M0_9 = 0.0;
@ -70,14 +70,14 @@ Galileo_Almanac::Galileo_Almanac()
E5b_HS_9 = 0.0; E5b_HS_9 = 0.0;
E1B_HS_9 = 0.0; E1B_HS_9 = 0.0;
E5a_HS_9 = 0.0; E5a_HS_9 = 0.0;
int SVID3_9; SVID3_9 = 0;
DELTA_A_9 = 0.0; DELTA_A_9 = 0.0;
e_9 = 0.0; e_9 = 0.0;
omega_9 = 0.0; omega_9 = 0.0;
delta_i_9 = 0.0; delta_i_9 = 0.0;
/*Word type 10: Almanac for SVID3 (2/2)*/ /*Word type 10: Almanac for SVID3 (2/2)*/
int IOD_a_10 = 0; IOD_a_10 = 0;
Omega0_10 = 0.0; Omega0_10 = 0.0;
Omega_dot_10 = 0.0; Omega_dot_10 = 0.0;
M0_10 = 0.0; M0_10 = 0.0;

View File

@ -62,6 +62,7 @@ protected:
message = 0; message = 0;
factory = std::make_shared<GNSSBlockFactory>(); factory = std::make_shared<GNSSBlockFactory>();
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test() ~GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test()
@ -87,15 +88,15 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0;
float max_delay_error_chips; float max_delay_error_chips = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;

View File

@ -88,27 +88,27 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0;
float max_delay_error_chips; float max_delay_error_chips = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter = 0;
unsigned int detection_counter; unsigned int detection_counter = 0;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter = 0;
unsigned int acquired_samples; unsigned int acquired_samples = 0;
unsigned int mean_acq_time_us; unsigned int mean_acq_time_us = 0;
double mse_doppler; double mse_doppler = 0.0;
double mse_delay; double mse_delay = 0.0;
double Pd; double Pd = 0.0;
double Pfa_p; double Pfa_p = 0.0;
double Pfa_a; double Pfa_a = 0.0;
}; };

View File

@ -62,6 +62,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GalileoE1PcpsCccwsrAmbiguousAcquisitionTest() ~GalileoE1PcpsCccwsrAmbiguousAcquisitionTest()
@ -88,15 +89,15 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0;
float max_delay_error_chips; float max_delay_error_chips = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;

View File

@ -68,6 +68,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test() ~GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test()
@ -95,16 +96,16 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
unsigned int folding_factor; unsigned int folding_factor = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0.0;
float max_delay_error_chips; float max_delay_error_chips = 0.0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;
@ -121,7 +122,7 @@ protected:
std::ofstream pdpfafile; std::ofstream pdpfafile;
unsigned int miss_detection_counter; unsigned int miss_detection_counter;
bool dump_test_results; bool dump_test_results = false;
}; };

View File

@ -68,6 +68,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test() ~GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test()
@ -94,15 +95,15 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0;
float max_delay_error_chips; float max_delay_error_chips = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;

View File

@ -63,6 +63,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest() ~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
@ -91,27 +92,27 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_delay_sec; double expected_delay_sec = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
double expected_delay_chips1; double expected_delay_chips1 = 0.0;
double expected_delay_sec1; double expected_delay_sec1 = 0.0;
double expected_doppler_hz1; double expected_doppler_hz1 = 0.0;
double expected_delay_chips2; double expected_delay_chips2 = 0.0;
double expected_delay_sec2; double expected_delay_sec2 = 0.0;
double expected_doppler_hz2; double expected_doppler_hz2 = 0.0;
double expected_delay_chips3; double expected_delay_chips3 = 0.0;
double expected_delay_sec3; double expected_delay_sec3 = 0.0;
double expected_doppler_hz3; double expected_doppler_hz3 = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0.0;
float max_delay_error_chips; float max_delay_error_chips = 0.0;
int CAF_window_hz; int CAF_window_hz = 0;
int Zero_padding; int Zero_padding = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;
@ -125,7 +126,7 @@ protected:
double Pfa_p; double Pfa_p;
double Pfa_a; double Pfa_a;
int sat; int sat = 0;
}; };
void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::init() void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest::init()

View File

@ -63,6 +63,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = {0};
init();
} }
~GpsL1CaPcpsOpenClAcquisitionGSoC2013Test() ~GpsL1CaPcpsOpenClAcquisitionGSoC2013Test()
@ -87,15 +88,15 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0;
float max_delay_error_chips; float max_delay_error_chips = 0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter;
unsigned int detection_counter; unsigned int detection_counter;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter;

View File

@ -89,27 +89,27 @@ protected:
int message; int message;
boost::thread ch_thread; boost::thread ch_thread;
unsigned int integration_time_ms; unsigned int integration_time_ms = 0;
unsigned int fs_in; unsigned int fs_in = 0;
double expected_delay_chips; double expected_delay_chips = 0.0;
double expected_doppler_hz; double expected_doppler_hz = 0.0;
float max_doppler_error_hz; float max_doppler_error_hz = 0.0;
float max_delay_error_chips; float max_delay_error_chips = 0.0;
unsigned int num_of_realizations; unsigned int num_of_realizations = 0;
unsigned int realization_counter; unsigned int realization_counter = 0;
unsigned int detection_counter; unsigned int detection_counter = 0;
unsigned int correct_estimation_counter; unsigned int correct_estimation_counter = 0;
unsigned int acquired_samples; unsigned int acquired_samples = 0;
unsigned int mean_acq_time_us; unsigned int mean_acq_time_us = 0;
double mse_doppler; double mse_doppler = 0.0;
double mse_delay; double mse_delay = 0.0;
double Pd; double Pd = 0.0;
double Pfa_p; double Pfa_p = 0.0;
double Pfa_a; double Pfa_a = 0.0;
}; };
void GpsL1CaPcpsTongAcquisitionGSoC2013Test::init() void GpsL1CaPcpsTongAcquisitionGSoC2013Test::init()