Mailinglist Archive: opensuse-programming (31 mails)

< Previous Next >
Re: [opensuse-programming] What's the best way to cure uninitialized variables?
  • From: Dave Plater <dave.plater@xxxxxxxxxxx>
  • Date: Sat, 08 Aug 2009 12:51:21 +0200
  • Message-id: <4A7D58A9.9000804@xxxxxxxxxxx>
On 08/08/2009 10:35 AM, Per Jessen wrote:
Dave Plater wrote:

On 08/07/2009 04:37 PM, Per Jessen wrote:

Dave Plater wrote:

So if I initialize m_float in btVector3.h where I think it is
declared, do you think it will solve at least one of the problems?

Yes, that's what I was going to try. Probably in the default

/Per Jessen, Zürich

The author of the program has used m_float in more than one instance,
I tried initializing the one in btVector3 and got a compiler error,
tried initializing the one in btSolverbody.h and it didn't make any
difference. I think I might have bitten off more than I can chew but
thats the best way to learn.

I couldn't get it whole thing to build, I ended up getting linker errors
with a ton of symbols not found.

In extern/bullet2/src/LinearMath/btVector3.h, try this: (line 65-66)

/**@brief No initialization constructor */
m_floats[0]=m_floats[1]=m_floats[2]=m_floats[3]=btScalar(0.); }

It compiles, but I don't know if it will solve the problem.

/Per Jessen, Zürich

It works! Now I'm left with :-
I: Program causes undefined operation
(likely same variable used twiceand post/pre incremented in the same
e.g. x = x++; Split it in two operations.
W: blender sequence-point
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp:1783, 1836

I: Program is using uninitialized variables.
Note the difference between "is used" and "may be used"
W: blender uninitialized-variable

The btCylinderShape.cpp and btTriangleShapeEx.h unititialized variables
have gone but is the undefined operation a result of the fix?
Dave P

To unsubscribe, e-mail: opensuse-programming+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-programming+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups