]> git.mxchange.org Git - flightgear.git/commitdiff
gcc warning fixes
authorTorsten Dreyer <Torsten@t3r.de>
Sat, 26 Jun 2010 19:24:46 +0000 (21:24 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Sat, 26 Jun 2010 19:24:46 +0000 (21:24 +0200)
src/ATC/atcutils.cxx
src/ATC/trafficcontrol.cxx
src/Main/options.cxx
src/Navaids/awynet.cxx
src/Navaids/positioned.cxx
utils/GPSsmooth/UGear_command.cxx
utils/GPSsmooth/gps_main.cxx

index 12747c4803a09a4860415c4d78f6890c76dd1202..589a387e2b3295c0edc2e3d2fe10b24444b573aa 100644 (file)
@@ -69,8 +69,8 @@ bool FGCommList::init( const SGPath& path ) {
     LoadComms(temp);
     temp = path;
     temp.append( "ATC/default.approach" );
-    LoadComms(temp);
-    return true;*/
+    LoadComms(temp);*/
+    return true;
 }
     
 
@@ -107,9 +107,8 @@ bool FGCommList::LoadComms(const SGPath& path) {
         fin >> skipcomment;
     }
     
-    fin.close();
+    fin.close();*/
     return true;    
-*/
 }
 
 
@@ -160,13 +159,14 @@ bool FGCommList::FindByFreq(const SGGeod& aPos, double freq,
         return false;
     }
 */
+    return false;
 }
 
 int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stations, atc_type tp)
 {
-/*
      // number of relevant stations found within range
      int found = 0;
+/*
      stations->erase(stations->begin(), stations->end());
      
      // get bucket number for plane position
@@ -203,8 +203,8 @@ int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stat
              }
          }
      }
-     return found;
 */
+     return found;
 }
 
 
@@ -248,8 +248,8 @@ double FGCommList::FindClosest(const SGGeod& aPos, ATCData& ad, atc_type tp, dou
         }
         range *= 10;
     }
-    return(-9999.0);
 */
+    return(-9999.0);
 }
 
 
@@ -277,8 +277,8 @@ bool FGCommList::FindByCode( const string& ICAO, ATCData& ad, atc_type tp ) {
             }
         }
     }
-    return false;
 */
+    return false;
 }
 
 // TODO - this function should move somewhere else eventually!
@@ -312,6 +312,7 @@ int FGCommList::GetAtisSequence( const string& apt_id,
     //      << "  Delta: " << delta << endl;
     return(tran.sequence + (delta ? 0 : LTRS*1000));
 */
+    return 2600;
 }
 /*****************************************************************************
  * FGKln89AlignedProjection 
@@ -369,4 +370,4 @@ SGGeod FGKln89AlignedProjection::ConvertFromLocal(const SGVec3d& pt) {
     return SGGeod::fromRadM(_origin.getLongitudeRad()+delta_lon, _origin.getLatitudeRad()+delta_lat, pt.z());
 }
 
-#endif // #ENABLE_ATCDCL
\ No newline at end of file
+#endif // #ENABLE_ATCDCL
index 7848de10e044d446971aa0e09e85c21cd4636e07..ba00b60194f2288f4d3c6c1dc927983706867095 100644 (file)
@@ -38,15 +38,16 @@ FGTrafficRecord::FGTrafficRecord() :
   id(0), waitsForId(0),
   currentPos(0),
   leg(0),
+  frequencyId(0),
   state(0),
+   allowTransmission(true),
   latitude(0),
   longitude(0), 
    heading(0), 
    speed(0), 
    altitude(0), 
-   radius(0),
-   frequencyId(0),
-   allowTransmission(true) {
+   radius(0)
+{
 }
 
 void FGTrafficRecord::setPositionAndIntentions(int pos, FGAIFlightPlan *route)
index a994f59537670858180cba5824efeb92fa937020..abcd855352b2f588c97a6800bb61277eaaa530e9 100644 (file)
@@ -1661,7 +1661,7 @@ fgParseArgs (int argc, char **argv)
               cout << endl << "No. Device" << endl;
 
               vector <const char*>devices = smgr.get_available_devices();
-              for (int i=0; i<devices.size(); i++) {
+              for (vector <const char*>::size_type i=0; i<devices.size(); i++) {
                 cout << i << ".  \"" << devices[i] << "\"" << endl;
               }
               devices.clear();
index ab8ec1177b5c2a01602f4a16ab5eed9ac379d53b..5176134c06ca6d6d48d7ee518ac6ea088a28d5a9 100755 (executable)
@@ -354,7 +354,7 @@ FGAirRoute FGAirwayNetwork::findShortestRoute(int start, int end)
   foundRoute = false;
   totalDistance = 0;
   FGNode *firstNode = findNode(start);
-  FGNode *lastNode  = findNode(end);
+  //FGNode *lastNode  = findNode(end);
   //prevNode = prevPrevNode = -1;
   //prevNode = start;
   routes.clear();
index 91cd08d50afb35bc3730c6fad3b8a0749bc8a672..48f284648a7678a7c0ef1203d318ecf592827d23 100644 (file)
@@ -666,8 +666,8 @@ findWithPartial(const NamedPositionedIndex& aIndex, const std::string& aName,
 ///////////////////////////////////////////////////////////////////////////////
 
 FGPositioned::FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos, bool aIndexed) :
-  mType(ty),
   mPosition(aPos),
+  mType(ty),
   mIdent(aIdent)
 {  
   SGReferenced::get(this); // hold an owning ref, for the moment
index c490a4238146950b15371d7370b57e23b7cad114..c4bef8ad40971f4e3079b2b1eac03872cb399874 100644 (file)
@@ -55,8 +55,8 @@ static int serial_send( SGSerialPort *serial, int sequence,
     unsigned int result = serial->write_port( package.c_str(),
                                               package.length() );
     if ( result != package.length() ) {
-        printf("ERROR: wrote %d of %d bytes to serial port!\n",
-               result, package.length() );
+        printf("ERROR: wrote %u of %u bytes to serial port!\n",
+               result, (unsigned)package.length() );
         return 0;
     }
 
@@ -88,7 +88,7 @@ int UGCommand::update( SGSerialPort *serial )
 
     // send the command
     string command = cmd_queue.front();
-    int result = serial_send( serial, cmd_send_index, command );
+    /*int result =*/ serial_send( serial, cmd_send_index, command );
 
     return cmd_send_index;
 }
index cb70e3bc09b9be3037e4c48b42832c4a9f81c7e1..f5a10d7ac0b36656710bc0529e89e69e8e0802d4 100644 (file)
@@ -276,7 +276,7 @@ static void gps2fg( const GPSPoint p, FGNetFDM *fdm, FGNetCtrls *ctrls )
 
 static void send_data( const GPSPoint p ) {
     int len;
-    int ctrlsize = sizeof( FGNetCtrls );
+//    int ctrlsize = sizeof( FGNetCtrls );
     int fdmsize = sizeof( FGNetFDM );
 
     // cout << "Running main loop" << endl;