From 1290c25a38175ce490e3ca775a5ce10100b6e4de Mon Sep 17 00:00:00 2001 From: torsten Date: Sat, 2 Jan 2010 20:28:38 +0000 Subject: [PATCH] eliminate gcc warnings --- src/ATCDCL/AILocalTraffic.cxx | 4 ++-- src/ATCDCL/ATCutils.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ATCDCL/AILocalTraffic.cxx b/src/ATCDCL/AILocalTraffic.cxx index 6c1b77d8f..b0b1c6e22 100644 --- a/src/ATCDCL/AILocalTraffic.cxx +++ b/src/ATCDCL/AILocalTraffic.cxx @@ -164,8 +164,8 @@ void FGAILocalTraffic::GetRwyDetails(const string& id) { // move to the +l end/center of the runway //cout << "Runway center is at " << runway._lon << ", " << runway._lat << '\n'; - double tshlon, tshlat, tshr; - double tolon, tolat, tor; + double tshlon = 0.0, tshlat = 0.0, tshr; + double tolon = 0.0, tolat = 0.0, tor; rwy.length = runway->lengthM(); rwy.width = runway->widthM(); geo_direct_wgs_84 ( aptElev, runway->latitude(), runway->longitude(), other_way, diff --git a/src/ATCDCL/ATCutils.cxx b/src/ATCDCL/ATCutils.cxx index fe484f256..02485a549 100644 --- a/src/ATCDCL/ATCutils.cxx +++ b/src/ATCDCL/ATCutils.cxx @@ -86,7 +86,7 @@ string ConvertNumToSpokenDigits(const int& n) { // Anything else is not guaranteed to be handled correctly! string ConvertRwyNumToSpokenString(const string &rwy) { string rslt; - for (int ii = 0; ii < rwy.length(); ii++){ + for (size_t ii = 0; ii < rwy.length(); ii++){ if (rslt.length()) rslt += " "; string ch = rwy.substr(ii,1); if (isdigit(ch[0])) rslt += ConvertNumToSpokenDigits(atoi(ch.c_str()));