From ff69754756da5500a72f074f9c48538c0101b55a Mon Sep 17 00:00:00 2001 From: Ganael Laplanche Date: Sat, 1 Sep 2018 22:27:07 +0200 Subject: [PATCH 1/3] Fix build with clang 7 on FreeBSD 12-CURRENT: src/AIModel/AIFlightPlanCreatePushBack.cxx:96:48: error: ordered comparison between pointer and zero ('FGTaxiNode *' and 'int') (see: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230502) --- src/AIModel/AIFlightPlanCreatePushBack.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIModel/AIFlightPlanCreatePushBack.cxx b/src/AIModel/AIFlightPlanCreatePushBack.cxx index 458e19a94..998a53a93 100644 --- a/src/AIModel/AIFlightPlanCreatePushBack.cxx +++ b/src/AIModel/AIFlightPlanCreatePushBack.cxx @@ -93,7 +93,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac, FGGroundNetwork* groundNet = dep->groundNetwork(); FGParking *parking = gate.parking(); - if (parking && parking->getPushBackPoint() > 0) { + if (parking && parking->getPushBackPoint() != NULL) { FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false); int size = route.size(); From 2756735d0ca392bbcd5a42bfefd4681385f0cb5f Mon Sep 17 00:00:00 2001 From: Ganael Laplanche Date: Sat, 1 Sep 2018 22:28:41 +0200 Subject: [PATCH 2/3] Fix build with clang 7 on FreeBSD 12-CURRENT: error: reference to 'stack' is ambiguous (see: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230502) --- src/FDM/UIUCModel/uiuc_aircraft.h | 2 +- src/FDM/UIUCModel/uiuc_parsefile.h | 4 ++-- src/FDM/UIUCModel/uiuc_recorder.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FDM/UIUCModel/uiuc_aircraft.h b/src/FDM/UIUCModel/uiuc_aircraft.h index 88c178654..a38d84cf4 100644 --- a/src/FDM/UIUCModel/uiuc_aircraft.h +++ b/src/FDM/UIUCModel/uiuc_aircraft.h @@ -150,7 +150,7 @@ #include "uiuc_parsefile.h" #include "uiuc_flapdata.h" -typedef stack :: iterator LIST; +typedef ::stack :: iterator LIST; /* Add more keywords here if required*/ enum {init_flag = 1000, geometry_flag, controlSurface_flag, controlsMixer_flag, diff --git a/src/FDM/UIUCModel/uiuc_parsefile.h b/src/FDM/UIUCModel/uiuc_parsefile.h index f39b8c6c0..4c8fb23e8 100644 --- a/src/FDM/UIUCModel/uiuc_parsefile.h +++ b/src/FDM/UIUCModel/uiuc_parsefile.h @@ -23,7 +23,7 @@ class ParseFile { private: - stack commands; + ::stack commands; ifstream file; void readFile(); @@ -37,7 +37,7 @@ class ParseFile void removeComments(string& inputLine); string getToken(string inputLine, int tokenNo); void storeCommands(string inputLine); - stack getCommands(); + ::stack getCommands(); }; #endif // _PARSE_FILE_H_ diff --git a/src/FDM/UIUCModel/uiuc_recorder.cpp b/src/FDM/UIUCModel/uiuc_recorder.cpp index b620daf9c..9269b8b8e 100644 --- a/src/FDM/UIUCModel/uiuc_recorder.cpp +++ b/src/FDM/UIUCModel/uiuc_recorder.cpp @@ -102,7 +102,7 @@ using std::endl; // -dw void uiuc_recorder( double dt ) { - stack command_list; + ::stack command_list; string linetoken; // static int init = 0; static int recordStep = 0; From 63d6f0218ba53bd3971fa1014b78d14f05b8762e Mon Sep 17 00:00:00 2001 From: Ganael Laplanche Date: Sun, 2 Sep 2018 14:17:26 +0200 Subject: [PATCH 3/3] Use nullptr instead of NULL --- src/AIModel/AIFlightPlanCreatePushBack.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIModel/AIFlightPlanCreatePushBack.cxx b/src/AIModel/AIFlightPlanCreatePushBack.cxx index 998a53a93..7391d4165 100644 --- a/src/AIModel/AIFlightPlanCreatePushBack.cxx +++ b/src/AIModel/AIFlightPlanCreatePushBack.cxx @@ -93,7 +93,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac, FGGroundNetwork* groundNet = dep->groundNetwork(); FGParking *parking = gate.parking(); - if (parking && parking->getPushBackPoint() != NULL) { + if (parking && parking->getPushBackPoint() != nullptr) { FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false); int size = route.size();