From 7b6780eb9ea9f569ef864c7145dff658ac3af201 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 20:22:20 +0200 Subject: [PATCH 1/3] Fix building if glog is not present in the system (e.g. CentOS7) --- src/core/monitor/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/monitor/CMakeLists.txt b/src/core/monitor/CMakeLists.txt index 545e8641e..a6bc9c2f3 100644 --- a/src/core/monitor/CMakeLists.txt +++ b/src/core/monitor/CMakeLists.txt @@ -35,3 +35,4 @@ list(SORT CORE_MONITOR_LIBS_HEADERS) add_library(core_monitor_lib ${CORE_MONITOR_LIBS_SOURCES} ${CORE_MONITOR_LIBS_HEADERS}) source_group(Headers FILES ${CORE_MONITOR_LIBS_HEADERS}) target_link_libraries(core_monitor_lib ${Boost_LIBRARIES}) +add_dependencies(core_monitor_lib glog-${glog_RELEASE}) From ff7fbd397a3658292eb3b3dc737d6ec2ab64fa3f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 20:46:32 +0200 Subject: [PATCH 2/3] Fix warning about unused parameter --- src/core/system_parameters/gnss_synchro.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/system_parameters/gnss_synchro.h b/src/core/system_parameters/gnss_synchro.h index 6e240c0c3..c9cd0ee0c 100644 --- a/src/core/system_parameters/gnss_synchro.h +++ b/src/core/system_parameters/gnss_synchro.h @@ -83,6 +83,9 @@ public: template void serialize(Archive& ar, const unsigned int version) { + if (version) + { + }; // Satellite and signal info ar& System; ar& Signal; From 1cd4696da2975b9aa51f14731654c2d8e47b4a5a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 21:00:53 +0200 Subject: [PATCH 3/3] Fix defects detected by Coverity Scan --- .../libs/acquisition_dump_reader.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc index 8cb81718b..992c6a528 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc @@ -167,6 +167,20 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, { std::cout << "¡¡¡Unreachable Acquisition dump file!!!" << std::endl; } + acq_doppler_hz = 0.0; + acq_delay_samples = 0.0; + test_statistic = 0.0; + input_power = 0.0; + threshold = 0.0; + positive_acq = 0; + sample_counter = 0; + PRN = 0; + d_sat = 0; + d_doppler_max = doppler_max_; + d_doppler_step = doppler_step_; + d_samples_per_code = samples_per_code_; + d_num_doppler_bins = 0; + acquisition_dump_reader(basename, sat_, doppler_max_, @@ -176,6 +190,7 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, execution); } + acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, unsigned int sat, unsigned int doppler_max, @@ -197,6 +212,7 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, positive_acq = 0; sample_counter = 0; PRN = 0; + if (d_doppler_step == 0) d_doppler_step = 1; d_num_doppler_bins = static_cast(ceil(static_cast(static_cast(d_doppler_max) - static_cast(-d_doppler_max)) / static_cast(d_doppler_step))); std::vector > mag_aux(d_num_doppler_bins, std::vector(d_samples_per_code)); mag = mag_aux;