gcc warning fixes
This commit is contained in:
parent
f7d0a7bd39
commit
2e6d7e111a
7 changed files with 21 additions and 19 deletions
|
@ -69,8 +69,8 @@ bool FGCommList::init( const SGPath& path ) {
|
||||||
LoadComms(temp);
|
LoadComms(temp);
|
||||||
temp = path;
|
temp = path;
|
||||||
temp.append( "ATC/default.approach" );
|
temp.append( "ATC/default.approach" );
|
||||||
LoadComms(temp);
|
LoadComms(temp);*/
|
||||||
return true;*/
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,9 +107,8 @@ bool FGCommList::LoadComms(const SGPath& path) {
|
||||||
fin >> skipcomment;
|
fin >> skipcomment;
|
||||||
}
|
}
|
||||||
|
|
||||||
fin.close();
|
fin.close();*/
|
||||||
return true;
|
return true;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,13 +159,14 @@ bool FGCommList::FindByFreq(const SGGeod& aPos, double freq,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stations, atc_type tp)
|
int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stations, atc_type tp)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
// number of relevant stations found within range
|
// number of relevant stations found within range
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
/*
|
||||||
stations->erase(stations->begin(), stations->end());
|
stations->erase(stations->begin(), stations->end());
|
||||||
|
|
||||||
// get bucket number for plane position
|
// 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;
|
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!
|
// TODO - this function should move somewhere else eventually!
|
||||||
|
@ -312,6 +312,7 @@ int FGCommList::GetAtisSequence( const string& apt_id,
|
||||||
// << " Delta: " << delta << endl;
|
// << " Delta: " << delta << endl;
|
||||||
return(tran.sequence + (delta ? 0 : LTRS*1000));
|
return(tran.sequence + (delta ? 0 : LTRS*1000));
|
||||||
*/
|
*/
|
||||||
|
return 2600;
|
||||||
}
|
}
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* FGKln89AlignedProjection
|
* FGKln89AlignedProjection
|
||||||
|
|
|
@ -38,15 +38,16 @@ FGTrafficRecord::FGTrafficRecord() :
|
||||||
id(0), waitsForId(0),
|
id(0), waitsForId(0),
|
||||||
currentPos(0),
|
currentPos(0),
|
||||||
leg(0),
|
leg(0),
|
||||||
|
frequencyId(0),
|
||||||
state(0),
|
state(0),
|
||||||
|
allowTransmission(true),
|
||||||
latitude(0),
|
latitude(0),
|
||||||
longitude(0),
|
longitude(0),
|
||||||
heading(0),
|
heading(0),
|
||||||
speed(0),
|
speed(0),
|
||||||
altitude(0),
|
altitude(0),
|
||||||
radius(0),
|
radius(0)
|
||||||
frequencyId(0),
|
{
|
||||||
allowTransmission(true) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FGTrafficRecord::setPositionAndIntentions(int pos, FGAIFlightPlan *route)
|
void FGTrafficRecord::setPositionAndIntentions(int pos, FGAIFlightPlan *route)
|
||||||
|
|
|
@ -1661,7 +1661,7 @@ fgParseArgs (int argc, char **argv)
|
||||||
cout << endl << "No. Device" << endl;
|
cout << endl << "No. Device" << endl;
|
||||||
|
|
||||||
vector <const char*>devices = smgr.get_available_devices();
|
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;
|
cout << i << ". \"" << devices[i] << "\"" << endl;
|
||||||
}
|
}
|
||||||
devices.clear();
|
devices.clear();
|
||||||
|
|
|
@ -354,7 +354,7 @@ FGAirRoute FGAirwayNetwork::findShortestRoute(int start, int end)
|
||||||
foundRoute = false;
|
foundRoute = false;
|
||||||
totalDistance = 0;
|
totalDistance = 0;
|
||||||
FGNode *firstNode = findNode(start);
|
FGNode *firstNode = findNode(start);
|
||||||
FGNode *lastNode = findNode(end);
|
//FGNode *lastNode = findNode(end);
|
||||||
//prevNode = prevPrevNode = -1;
|
//prevNode = prevPrevNode = -1;
|
||||||
//prevNode = start;
|
//prevNode = start;
|
||||||
routes.clear();
|
routes.clear();
|
||||||
|
|
|
@ -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) :
|
FGPositioned::FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos, bool aIndexed) :
|
||||||
mType(ty),
|
|
||||||
mPosition(aPos),
|
mPosition(aPos),
|
||||||
|
mType(ty),
|
||||||
mIdent(aIdent)
|
mIdent(aIdent)
|
||||||
{
|
{
|
||||||
SGReferenced::get(this); // hold an owning ref, for the moment
|
SGReferenced::get(this); // hold an owning ref, for the moment
|
||||||
|
|
|
@ -55,8 +55,8 @@ static int serial_send( SGSerialPort *serial, int sequence,
|
||||||
unsigned int result = serial->write_port( package.c_str(),
|
unsigned int result = serial->write_port( package.c_str(),
|
||||||
package.length() );
|
package.length() );
|
||||||
if ( result != package.length() ) {
|
if ( result != package.length() ) {
|
||||||
printf("ERROR: wrote %d of %d bytes to serial port!\n",
|
printf("ERROR: wrote %u of %u bytes to serial port!\n",
|
||||||
result, package.length() );
|
result, (unsigned)package.length() );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ int UGCommand::update( SGSerialPort *serial )
|
||||||
|
|
||||||
// send the command
|
// send the command
|
||||||
string command = cmd_queue.front();
|
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;
|
return cmd_send_index;
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,7 @@ static void gps2fg( const GPSPoint p, FGNetFDM *fdm, FGNetCtrls *ctrls )
|
||||||
|
|
||||||
static void send_data( const GPSPoint p ) {
|
static void send_data( const GPSPoint p ) {
|
||||||
int len;
|
int len;
|
||||||
int ctrlsize = sizeof( FGNetCtrls );
|
// int ctrlsize = sizeof( FGNetCtrls );
|
||||||
int fdmsize = sizeof( FGNetFDM );
|
int fdmsize = sizeof( FGNetFDM );
|
||||||
|
|
||||||
// cout << "Running main loop" << endl;
|
// cout << "Running main loop" << endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue