From: ThorstenB Date: Fri, 29 Oct 2010 19:14:09 +0000 (+0200) Subject: Fixed some compiler warnings. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7dd2cf19e8bc830d850a0f0b99e12b439864c133;p=flightgear.git Fixed some compiler warnings. Please the compiler (gods). --- diff --git a/src/AIModel/AIBallistic.cxx b/src/AIModel/AIBallistic.cxx index fa06b291e..a0faf6eca 100644 --- a/src/AIModel/AIBallistic.cxx +++ b/src/AIModel/AIBallistic.cxx @@ -41,10 +41,12 @@ const double FGAIBallistic::slugs_to_lbs = 32.1740485564; FGAIBallistic::FGAIBallistic(object_type ot) : FGAIBase(ot), _height(0.0), +_speed(0), _ht_agl_ft(0.0), _azimuth(0.0), _elevation(0.0), _rotation(0.0), +hs(0), _elapsed_time(0), _aero_stabilised(false), _drag_area(0.007), @@ -65,9 +67,7 @@ _report_impact(false), _external_force(false), _report_expiry(false), _impact_report_node(fgGetNode("/ai/models/model-impact", true)), -hs(0), -_old_height(0), -_speed(0) +_old_height(0) { no_roll = false; diff --git a/src/AIModel/AIWingman.cxx b/src/AIModel/AIWingman.cxx index 6c93f3955..7233abd2b 100644 --- a/src/AIModel/AIWingman.cxx +++ b/src/AIModel/AIWingman.cxx @@ -29,9 +29,9 @@ FGAIWingman::FGAIWingman() : FGAIBallistic(otWingman), _formate_to_ac(true), -_break_angle(-90), _break(false), _join(false), +_break_angle(-90), _coeff_hdg(5.0), _coeff_pch(5.0), _coeff_bnk(5.0), diff --git a/src/Instrumentation/KLN89/kln89.cxx b/src/Instrumentation/KLN89/kln89.cxx index b074e2295..48d5646ca 100644 --- a/src/Instrumentation/KLN89/kln89.cxx +++ b/src/Instrumentation/KLN89/kln89.cxx @@ -867,7 +867,7 @@ int KLN89::GetLabelQuadrant(double h1, double h2) { while(h2 < 0.0) h2 += 360.0; while(h2 > 360.0) h2 -= 360.0; double max_min_diff = 0.0; - int quad; + int quad = 1; for(int i=0; i<4; ++i) { double h = 45 + (90 * i); double diff1 = fabs(h - h1); diff --git a/src/Instrumentation/dclgps.cxx b/src/Instrumentation/dclgps.cxx index 018e943c4..41697092b 100644 --- a/src/Instrumentation/dclgps.cxx +++ b/src/Instrumentation/dclgps.cxx @@ -635,7 +635,7 @@ void DCLGPS::update(double dt) { */ string DCLGPS::ExpandSIAPIdent(const string& ident) { string name; - bool has_rwy; + bool has_rwy = false; switch(ident[0]) { case 'N': name = "NDB or GPS"; has_rwy = false; break; diff --git a/src/Main/fg_os_osgviewer.cxx b/src/Main/fg_os_osgviewer.cxx index 483a7f417..e2556f5b2 100644 --- a/src/Main/fg_os_osgviewer.cxx +++ b/src/Main/fg_os_osgviewer.cxx @@ -102,7 +102,7 @@ static osg::ref_ptr mainCamera; static void setStereoMode( const char * mode ) { - DisplaySettings::StereoMode stereoMode; + DisplaySettings::StereoMode stereoMode = DisplaySettings::QUAD_BUFFER; bool stereoOn = true; if (strcmp(mode,"QUAD_BUFFER")==0)