From dd1ec76cdf919c93b57ee5536a2af755615ce79b Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 21 Jan 2019 23:21:19 +0000 Subject: [PATCH] fix build with llvm7: don't compare pointer > 0 also in upstream --- games/flightgear/base/Makefile | 4 ++-- ...h-src_AIModel_AIFlightPlanCreatePushBack_cxx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 games/flightgear/base/patches/patch-src_AIModel_AIFlightPlanCreatePushBack_cxx diff --git a/games/flightgear/base/Makefile b/games/flightgear/base/Makefile index 3b5a06cb4cb..67a71f4aa84 100644 --- a/games/flightgear/base/Makefile +++ b/games/flightgear/base/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.14 2018/10/26 19:53:06 naddy Exp $ +# $OpenBSD: Makefile,v 1.15 2019/01/21 23:21:19 naddy Exp $ COMMENT = modern, open-source flight simulator DISTNAME = flightgear-${V} -REVISION = 2 +REVISION = 3 WANTLIB += ICE GL GLU OpenThreads SimGearCore SimGearScene SM X11 Xext Xi WANTLIB += Xmu c curl glut m openal osg osgDB osgFX osgGA osgParticle diff --git a/games/flightgear/base/patches/patch-src_AIModel_AIFlightPlanCreatePushBack_cxx b/games/flightgear/base/patches/patch-src_AIModel_AIFlightPlanCreatePushBack_cxx new file mode 100644 index 00000000000..4fe78a26e12 --- /dev/null +++ b/games/flightgear/base/patches/patch-src_AIModel_AIFlightPlanCreatePushBack_cxx @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_AIModel_AIFlightPlanCreatePushBack_cxx,v 1.1 2019/01/21 23:21:19 naddy Exp $ + +fix clang error: +ordered comparison between pointer and zero + +Index: src/AIModel/AIFlightPlanCreatePushBack.cxx +--- src/AIModel/AIFlightPlanCreatePushBack.cxx.orig ++++ src/AIModel/AIFlightPlanCreatePushBack.cxx +@@ -93,7 +93,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac, + + FGGroundNetwork* groundNet = dep->getDynamics()->getGroundNetwork(); + FGParking *parking = gate.parking(); +- if (parking && parking->getPushBackPoint() > 0) { ++ if (parking && parking->getPushBackPoint() != nullptr) { + FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false); + + int size = route.size();