From 6ae4ddb3b8b62b44e9c0f7d0239e7731914f8dc9 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Thu, 2 Jul 2020 10:33:36 +0200 Subject: [PATCH 1/2] init nread_elements to prevent compiler warning. --- .../signal_source/adapters/ad9361_fpga_signal_source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc index d85b79c58..b15aa718f 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc @@ -372,8 +372,8 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const std::vector input_samples2(MAX_INPUT_SAMPLES_TOTAL * 2); std::vector input_samples_dma(MAX_INPUT_SAMPLES_TOTAL * 2 * 2); - int nread_elements; - int nread_elements2; + int nread_elements = 0; // num bytes read from the file corresponding to frequency band 1 + int nread_elements2 = 0; // num bytes read from the file corresponding to frequency band 2 int file_completed = 0; int num_transferred_bytes; From c412d0a3f5298b81f05c607d18ee62dca8c0614a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 2 Jul 2020 10:53:51 +0200 Subject: [PATCH 2/2] Fix clang warning: equality comparison with extraneous parentheses --- .../signal_source/adapters/ad9361_fpga_signal_source.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc index b15aa718f..f222281ee 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc @@ -392,7 +392,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const //************************************************************************** int nsamples = 0; - while ((file_completed == 0)) + while (file_completed == 0) { unsigned int dma_index = 0;