fix build with llvm7: don't compare pointer > 0

also in upstream
This commit is contained in:
naddy 2019-01-21 23:21:19 +00:00
parent 498a18e326
commit dd1ec76cdf
2 changed files with 19 additions and 2 deletions

View File

@ -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

View File

@ -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();