fixing coverity issues

This commit is contained in:
Carles Fernandez 2015-05-15 11:47:34 +02:00
parent d95a28cea7
commit 6ecd6ebe52
32 changed files with 49 additions and 52 deletions

View File

@ -106,7 +106,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_
<< " unknown acquisition item type"; << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -106,17 +106,14 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
shift_resolution_, if_, fs_in_, samples_per_ms, code_length_, shift_resolution_, if_, fs_in_, samples_per_ms, code_length_,
bit_transition_flag_, queue_, dump_, dump_filename_); bit_transition_flag_, queue_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
<< stream_to_vector_->unique_id() << ")"; DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id()
<< ")";
} }
else else
{ {
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_ << " unknown acquisition item type";
<< " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -106,7 +106,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_
<< " unknown acquisition item type"; << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -140,7 +140,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_
<< " unknown acquisition item type"; << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -107,7 +107,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_
<< " unknown acquisition item type"; << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -114,15 +114,17 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
LOG(WARNING) << item_type_ LOG(WARNING) << item_type_
<< " unknown acquisition item type"; << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GalileoE5aNoncoherentIQAcquisitionCaf::~GalileoE5aNoncoherentIQAcquisitionCaf() GalileoE5aNoncoherentIQAcquisitionCaf::~GalileoE5aNoncoherentIQAcquisitionCaf()
{ {
delete[] codeI_; delete[] codeI_;
delete[] codeQ_; delete[] codeQ_;
} }
void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel)
{ {
channel_ = channel; channel_ = channel;

View File

@ -121,13 +121,13 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
threshold_ = 0.0; threshold_ = 0.0;
doppler_max_ = 0; doppler_max_ = 0;
doppler_step_ = 0; doppler_step_ = 0;
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition() GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -86,13 +86,13 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
{ {
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsAcquisitionFineDoppler::~GpsL1CaPcpsAcquisitionFineDoppler() GpsL1CaPcpsAcquisitionFineDoppler::~GpsL1CaPcpsAcquisitionFineDoppler()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -85,13 +85,13 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
{ {
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsAssistedAcquisition::~GpsL1CaPcpsAssistedAcquisition() GpsL1CaPcpsAssistedAcquisition::~GpsL1CaPcpsAssistedAcquisition()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -103,13 +103,13 @@ GpsL1CaPcpsMultithreadAcquisition::GpsL1CaPcpsMultithreadAcquisition(
{ {
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsMultithreadAcquisition::~GpsL1CaPcpsMultithreadAcquisition() GpsL1CaPcpsMultithreadAcquisition::~GpsL1CaPcpsMultithreadAcquisition()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -93,22 +93,20 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_); stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
<< ")"; DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id()
<< ")";
} }
else else
{ {
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsOpenClAcquisition::~GpsL1CaPcpsOpenClAcquisition() GpsL1CaPcpsOpenClAcquisition::~GpsL1CaPcpsOpenClAcquisition()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -135,7 +135,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }

View File

@ -95,13 +95,13 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
{ {
LOG(WARNING) << item_type_ << " unknown acquisition item type"; LOG(WARNING) << item_type_ << " unknown acquisition item type";
} }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL1CaPcpsTongAcquisition::~GpsL1CaPcpsTongAcquisition() GpsL1CaPcpsTongAcquisition::~GpsL1CaPcpsTongAcquisition()
{ {
delete[] code_; delete[] code_;
} }

View File

@ -118,13 +118,13 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
// LOG(WARNING) << item_type_ // LOG(WARNING) << item_type_
// << " unknown acquisition item type"; // << " unknown acquisition item type";
// } // }
gnss_synchro_ = {0}; gnss_synchro_ = new Gnss_Synchro();
} }
GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition() GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition()
{ {
delete[] code_; delete[] code_;
} }
@ -144,7 +144,7 @@ void GpsL2MPcpsAcquisition::set_threshold(float threshold)
if(pfa == 0.0) if(pfa == 0.0)
{ {
pfa = configuration_->property(role_+".pfa", 0.0); pfa = configuration_->property(role_ + ".pfa", 0.0);
} }
if(pfa == 0.0) if(pfa == 0.0)
{ {

View File

@ -59,7 +59,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GalileoE1DllPllVemlTrackingInternalTest() ~GalileoE1DllPllVemlTrackingInternalTest()

View File

@ -61,7 +61,7 @@ protected:
stop = false; stop = false;
message = 0; message = 0;
factory = std::make_shared<GNSSBlockFactory>(); factory = std::make_shared<GNSSBlockFactory>();
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -61,7 +61,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test() ~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test()

View File

@ -70,7 +70,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GalileoE1PcpsAmbiguousAcquisitionGSoCTest() ~GalileoE1PcpsAmbiguousAcquisitionGSoCTest()

View File

@ -60,7 +60,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GalileoE1PcpsAmbiguousAcquisitionTest() ~GalileoE1PcpsAmbiguousAcquisitionTest()

View File

@ -61,7 +61,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -67,7 +67,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -67,7 +67,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -62,7 +62,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -58,7 +58,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GalileoE5aTrackingTest() ~GalileoE5aTrackingTest()

View File

@ -62,7 +62,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsAcquisitionGSoC2013Test() ~GpsL1CaPcpsAcquisitionGSoC2013Test()

View File

@ -62,7 +62,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsAcquisitionTest() ~GpsL1CaPcpsAcquisitionTest()

View File

@ -66,7 +66,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsMultithreadAcquisitionGSoC2013Test() ~GpsL1CaPcpsMultithreadAcquisitionGSoC2013Test()

View File

@ -62,7 +62,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
init(); init();
} }

View File

@ -66,7 +66,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test() ~GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test()

View File

@ -63,7 +63,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsTongAcquisitionGSoC2013Test() ~GpsL1CaPcpsTongAcquisitionGSoC2013Test()

View File

@ -60,7 +60,7 @@ protected:
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
stop = false; stop = false;
message = 0; message = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL2MDllPllTrackingTest() ~GpsL2MDllPllTrackingTest()

View File

@ -68,7 +68,7 @@ protected:
message = 0; message = 0;
sampling_freqeuncy_hz = 0; sampling_freqeuncy_hz = 0;
nsamples = 0; nsamples = 0;
gnss_synchro = {0}; gnss_synchro = Gnss_Synchro();
} }
~GpsL2MPcpsAcquisitionTest() ~GpsL2MPcpsAcquisitionTest()