From 6007327da941e4eaada92ed795a8d8938f950d3e Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sun, 14 Jun 2020 18:14:19 +0100 Subject: [PATCH] src/ATC/trafficcontrol.cxx: fix some minor warnings. --- src/ATC/trafficcontrol.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index 72a2e4730..038fd1e23 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -84,7 +84,7 @@ TrafficVectorIterator searchActiveTraffic(TrafficVector& vec, int id) */ time_t ActiveRunway::requestTimeSlot(time_t eta) { - time_t newEta; + time_t newEta = 0; // default separation - 60 seconds time_t separation = 60; //if (wakeCategory == "heavy_jet") { @@ -870,7 +870,7 @@ string FGATCController::genTransponderCode(const string& fltRules) return string("1200"); } else { char buffer[5]; - snprintf(buffer, 5, "%d%d%d%d", rand() % 8, rand() % 8, rand() % 8, + snprintf(buffer, sizeof(buffer), "%d%d%d%d", rand() % 8, rand() % 8, rand() % 8, rand() % 8); return string(buffer); }