From f291eb01c4472b9f10871ff37430f86347c636c7 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Wed, 26 Oct 2011 12:11:29 +0000
Subject: [PATCH] Task #2669: remove compiler warnings

---
 RTCP/Storage/src/plotMS.cc | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/RTCP/Storage/src/plotMS.cc b/RTCP/Storage/src/plotMS.cc
index 8bdad4d4c01..945b45fd1d8 100644
--- a/RTCP/Storage/src/plotMS.cc
+++ b/RTCP/Storage/src/plotMS.cc
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
       channel = parset.nrChannelsPerSubband() == 1 ? 0 : 1; // default to first useful channel
 
     ASSERT( data );
-    ASSERT( channel < parset.nrChannelsPerSubband() );
+    ASSERT( channel >= 0 && (unsigned)channel < parset.nrChannelsPerSubband() );
 
     // determine base line from string
     casa::Block<int32> itsAnt1;
@@ -123,19 +123,19 @@ int main(int argc, char *argv[])
       std::vector<std::string> specified_stations = StringUtil::split(string(baselinestr), '-');
       ASSERTSTR( specified_stations.size() == 2, "-B: Specify as STATION1-STATION2, not " << baselinestr );
 
-      int station1index = std::find(stationNames.begin(),stationNames.end(),specified_stations[0]) - stationNames.begin();
-      int station2index = std::find(stationNames.begin(),stationNames.end(),specified_stations[1]) - stationNames.begin();
+      unsigned station1index = std::find(stationNames.begin(),stationNames.end(),specified_stations[0]) - stationNames.begin();
+      unsigned station2index = std::find(stationNames.begin(),stationNames.end(),specified_stations[1]) - stationNames.begin();
 
       ASSERTSTR( station1index < stationNames.size(), "Could not find station " << specified_stations[0] );
       ASSERTSTR( station2index < stationNames.size(), "Could not find station " << specified_stations[1] );
 
       for (baseline=0; baseline < itsAnt1.size(); baseline++) {
-        if (itsAnt1[baseline] == station1index
-         && itsAnt2[baseline] == station2index)
+        if ((unsigned)itsAnt1[baseline] == station1index
+         && (unsigned)itsAnt2[baseline] == station2index)
            break;
 
-        if (itsAnt2[baseline] == station1index
-         && itsAnt1[baseline] == station2index)
+        if ((unsigned)itsAnt2[baseline] == station1index
+         && (unsigned)itsAnt1[baseline] == station2index)
            break;
       }     
     }
-- 
GitLab