]> git.mxchange.org Git - flightgear.git/commitdiff
Fix compiler warning with sprintf format
authorThorstenB <brehmt@gmail.com>
Wed, 21 Nov 2012 19:54:41 +0000 (20:54 +0100)
committerThorstenB <brehmt@gmail.com>
Fri, 23 Nov 2012 20:16:07 +0000 (21:16 +0100)
since PositionedID is "long int", not "long long int".

src/AIModel/AIFlightPlanCreate.cxx
src/AIModel/AIFlightPlanCreatePushBack.cxx

index 92b901bcedc3efbfd12156b46290e6a6f68da4c0..7419552de7a0e05e11f8b6417d6e5ff1da93e262 100644 (file)
@@ -310,7 +310,7 @@ bool FGAIFlightPlan::createTakeoffTaxi(FGAIAircraft * ac, bool firstFlight,
     //cerr << "Building taxi route" << endl;
     while (taxiRoute.next(&node)) {
         char buffer[10];
-        snprintf(buffer, 10, "%lld", node);
+        snprintf(buffer, 10, "%ld", node);
         FGTaxiNode *tn =
             apt->getDynamics()->getGroundNetwork()->findNode(node);
         FGAIWaypoint *wpt =
@@ -415,7 +415,7 @@ bool FGAIFlightPlan::createLandingTaxi(FGAIAircraft * ac, FGAirport * apt,
     for (int i = 0; i < size - 2; i++) {
         taxiRoute.next(&node);
         char buffer[10];
-        snprintf(buffer, 10, "%lld", node);
+        snprintf(buffer, 10, "%ld", node);
         FGTaxiNode *tn = gn->findNode(node);
         FGAIWaypoint *wpt =
             createOnGround(ac, buffer, tn->geod(), apt->getElevation(),
index 976463ccf74867e0396afe658fd41495627a4677..a205efcf41e299c4c7c353367b70147bc532efba 100644 (file)
@@ -98,7 +98,7 @@ bool FGAIFlightPlan::createPushBack(FGAIAircraft *ac,
         while (route.next(&node))
         {
             char buffer[10];
-            snprintf (buffer, 10, "%lld", node);
+            snprintf (buffer, 10, "%ld", node);
             FGTaxiNode *tn = groundNet->findNode(node);
             FGAIWaypoint *wpt = createOnGround(ac, string(buffer), tn->geod(), dep->getElevation(), vTaxiBackward);