From 3bc8091745b0fb56ef59d145d047cac744ab8107 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 17 Jun 2019 23:42:16 +0200 Subject: [PATCH] Fix comparisons (warning: -Wsign-compare) --- src/algorithms/signal_source/libs/gnss_sdr_valve.cc | 6 +++--- src/core/receiver/gnss_flowgraph.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/algorithms/signal_source/libs/gnss_sdr_valve.cc b/src/algorithms/signal_source/libs/gnss_sdr_valve.cc index d599684ff..aa2bd1237 100644 --- a/src/algorithms/signal_source/libs/gnss_sdr_valve.cc +++ b/src/algorithms/signal_source/libs/gnss_sdr_valve.cc @@ -99,15 +99,15 @@ int Gnss_Sdr_Valve::work(int noutput_items, { return 0; } - //multichannel support - for (int ch = 0; ch < output_items.size(); ch++) + // multichannel support + for (unsigned int ch = 0; ch < output_items.size(); ch++) { memcpy(output_items[ch], input_items[ch], n * input_signature()->sizeof_stream_item(ch)); } d_ncopied_items += n; return n; } - for (int ch = 0; ch < output_items.size(); ch++) + for (unsigned int ch = 0; ch < output_items.size(); ch++) { memcpy(output_items[ch], input_items[ch], noutput_items * input_signature()->sizeof_stream_item(ch)); } diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 8af07e1e7..0611a4e26 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -218,7 +218,7 @@ void GNSSFlowgraph::connect() // Signal Source (i) > Signal conditioner (i) > #ifndef ENABLE_FPGA int RF_Channels = 0; - int signal_conditioner_ID = 0; + unsigned int signal_conditioner_ID = 0; for (int i = 0; i < sources_count_; i++) { try