]> git.mxchange.org Git - flightgear.git/commitdiff
even more warning fixes
authortorsten <torsten>
Fri, 21 Aug 2009 14:42:49 +0000 (14:42 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:43:09 +0000 (21:43 +0200)
src/Airports/calc_loc.cxx
src/Airports/dynamicloader.cxx
src/Airports/dynamics.cxx
src/Airports/dynamics.hxx
src/Airports/groundnetwork.cxx
src/Airports/groundnetwork.hxx

index 0b307402464a3a6d55d68fb8ef79f414afa8b1ca..dd45e41c3820aa5e8205c61886e4ed3c7b584e10 100644 (file)
@@ -42,7 +42,7 @@ int main( int argc, char **argv ) {
     }
 
     // calculate runway threshold point
-    double thresh_lat, thresh_lon, return_az;
+    double thresh_lat = 0.0, thresh_lon = 0.0, return_az = 0.0;
     geo_direct_wgs_84 ( 0.0, rwy_lat, rwy_lon, rwy_hdg, 
                         rwy_len / 2.0, &thresh_lat, &thresh_lon, &return_az );
     cout << "Threshold = " << thresh_lat << "," << thresh_lon << endl;
@@ -54,7 +54,7 @@ int main( int argc, char **argv ) {
     cout << "Distance = " << dist_m << endl;
 
     // back project that distance along the runway center line
-    double nloc_lat, nloc_lon;
+    double nloc_lat = 0.0, nloc_lon = 0.0;
     geo_direct_wgs_84 ( 0.0, thresh_lat, thresh_lon, rwy_hdg + 180.0, 
                         dist_m, &nloc_lat, &nloc_lon, &return_az );
     printf("New localizer = %.6f %.6f\n", nloc_lat, nloc_lon );
index 6dd15a3522610d73cd033534e3fd4ec717abbbf3..10cc253ba38ed34c0a7b4fe2df953d84fc7cf339 100644 (file)
@@ -117,6 +117,8 @@ void  FGAirportDynamicsXMLLoader::startElement (const char * name, const XMLAttr
                  holdPointType=3;
             } else if (attval==string("PushBack")) {
                  holdPointType=3;
+            } else {
+                 holdPointType=0;
             }
             //cerr << "Setting Holding point to " << holdPointType << endl;
             taxiNode.setHoldPointType(holdPointType);
index 8fd14162b8627bc0d4d313ba8862c8aef14f8c11..3e658a1473aa5effe73f158c7fe181d1e2c797b0 100644 (file)
@@ -536,9 +536,9 @@ const string& FGAirportDynamics::getId() const {
 // so that at least I can start working on assigning different frequencies to different
 // operations.
 
-int FGAirportDynamics::getGroundFrequency(int leg) { 
+int FGAirportDynamics::getGroundFrequency(unsigned leg) { 
      //return freqGround.size() ? freqGround[0] : 0; };
-     int groundFreq;
+     int groundFreq = 0;
      if (leg < 2) {
          SG_LOG(SG_ATC, SG_ALERT, "Leg value is smaller than two at " << SG_ORIGIN);
      }
index 56bef8225a54c57dc725fe57bffd25c2bf679078..1f142eb529bd36e9f0d0477e4ea382ec6d49f9a9 100644 (file)
@@ -117,7 +117,7 @@ public:
   FGTowerController   *getTowerController()   { return &towerController; };
 
   const string& getAtisInformation() { return atisInformation; };
-  int getGroundFrequency(int leg); //{ return freqGround.size() ? freqGround[0] : 0; };
+  int getGroundFrequency(unsigned leg); //{ return freqGround.size() ? freqGround[0] : 0; };
 
   void setRwyUse(const FGRunwayPreference& ref);
 };
index 529fc5952152d457e5ba334f42435c609dcce616..f1e0e086faa92073e0bcc06ef35825d113f49bc5 100644 (file)
@@ -267,11 +267,11 @@ void FGGroundNetwork::init()
       {
        if ((*j)->getEnd()->getIndex() == (*i)->getStart()->getIndex())
          {
-           int start1 = (*i)->getStart()->getIndex();
-           int end1   = (*i)->getEnd()  ->getIndex();
-           int start2 = (*j)->getStart()->getIndex();
-           int end2   = (*j)->getEnd()->getIndex();
-           int oppIndex = (*j)->getIndex();
+//         int start1 = (*i)->getStart()->getIndex();
+//         int end1   = (*i)->getEnd()  ->getIndex();
+//         int start2 = (*j)->getStart()->getIndex();
+//         int end2   = (*j)->getEnd()->getIndex();
+//         int oppIndex = (*j)->getIndex();
            //cerr << "Opposite of  " << (*i)->getIndex() << " (" << start1 << "," << end1 << ") "
            //   << "happens to be " << oppIndex      << " (" << start2 << "," << end2 << ") " << endl;
            (*i)->setOpposite(*j);
@@ -316,7 +316,7 @@ int FGGroundNetwork::findNearestNode(double lat, double lon)
   return findNearestNode(SGGeod::fromDeg(lon, lat));
 }
 
-FGTaxiNode *FGGroundNetwork::findNode(int idx)
+FGTaxiNode *FGGroundNetwork::findNode(unsigned idx)
 { /*
     for (FGTaxiNodeVectorIterator 
     itr = nodes.begin();
@@ -332,7 +332,7 @@ FGTaxiNode *FGGroundNetwork::findNode(int idx)
     return 0;
 }
 
-FGTaxiSegment *FGGroundNetwork::findSegment(int idx)
+FGTaxiSegment *FGGroundNetwork::findSegment(unsigned idx)
 {/*
   for (FGTaxiSegmentVectorIterator 
         itr = segments.begin();
index f1a7093a7dd43a30ba00604ec267c286251e4584..10a78b275abc236cfd547bf229358a9333684243 100644 (file)
@@ -256,8 +256,8 @@ public:
   int findNearestNode(double lat, double lon);
   int findNearestNode(const SGGeod& aGeod);
   
-  FGTaxiNode *findNode(int idx);
-  FGTaxiSegment *findSegment(int idx);
+  FGTaxiNode *findNode(unsigned idx);
+  FGTaxiSegment *findSegment(unsigned idx);
   FGTaxiRoute findShortestRoute(int start, int end, bool fullSearch=true);
   //void trace(FGTaxiNode *, int, int, double dist);