Hello.
Using new gcc 4.0 I have some serios warnings about uninitialized
variables, that are used. I created a patch, but I have no idea if it
is possible to do it my way. Can you check this out please? It would
be great if it will be fixed in next release. The CVS doesn't differ
in this case from 0.9.8. Thanks.
Best Regards Ladislav.
--- src/Cockpit/hud_rwy.cxx
+++ src/Cockpit/hud_rwy.cxx
@@ -352,6 +352,8 @@
void runway_instr::drawArrow() {
Point3D ac,rwy;
+ memset(&ac,0,sizeof(ac));
+ memset(&rwy,0,sizeof(rwy));
ac.setlat(current_aircraft.fdm_state->get_Latitude_deg());
ac.setlon(current_aircraft.fdm_state->get_Longitude_deg());
rwy.setlat(runway._lat);
--- src/FDM/Balloon/BalloonSim.cpp
+++ src/FDM/Balloon/BalloonSim.cpp
@@ -201,8 +201,8 @@
sgScaleVec3(fTotal, gravity_vector, mTotal);
-sgAddVec3(fTotal, fLift);
-sgAddVec3(fTotal, fFriction);
+//sgAddVec3(fTotal, fLift); //FIXME: uninitialized fLift
+//sgAddVec3(fTotal, fFriction); //FIXME: uninitialized fFriction
//claculate acceleration: a = F / m
sgVec3 aTotal, vTotal, dTotal;
--- src/Scenery/hitlist.cxx
+++ src/Scenery/hitlist.cxx
@@ -530,6 +530,7 @@
int this_hit = -1;
int max_hit = -1;
Point3D geoc;
+double *hit_elev_point;
double hit_elev = -;
double max_elev = -;
Point3D sc(scenery_center[0], scenery_center[1], scenery_center[2]) ;
@@ -564,6 +565,8 @@
if ( hit_elev > -9000 ) {
*terrain_elev = hit_elev;
+ hit_elev_point=hit_list->get_point(this_hit);
+ geoc=Point3D(hit_elev_point[0],hit_elev_point[1],hit_elev_point[2]);
*radius = geoc.radius();
sgVec3 tmp;
sgSetVec3(tmp, hit_list->get_normal(this_hit));
@@ -623,6 +626,7 @@
int this_hit = -1;
int max_hit = -1;
Point3D geoc;
+double *hit_elev_point;
double hit_elev = -;
double max_elev = -;
Point3D sc(scenery_center[0], scenery_center[1], scenery_center[2]) ;
@@ -657,6 +661,8 @@
if ( hit_elev > -9000 ) {
*terrain_elev = hit_elev;
+ hit_elev_point=hit_list->get_point(this_hit);
+geoc=Point3D(hit_elev_point[0],hit_elev_point[1],hit_elev_point[2]);
*radius = geoc.radius();
sgVec3 tmp;
sgSetVec3(tmp, hit_list->get_normal(this_hit));
___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d