Bug 2228 - Uninitialised values causing conditional jump in valgrind
Uninitialised values causing conditional jump in valgrind
Status: RESOLVED FIXED
Product: netanim
Classification: Unclassified
Component: animator
unspecified
PC Linux
: P5 minor
Assigned To: John Abraham
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-26 06:15 UTC by Beestre84
Modified: 2015-11-26 13:26 UTC (History)
1 user (show)

See Also:


Attachments
full initialiser list (968 bytes, text/plain)
2015-11-26 06:15 UTC, Beestre84
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beestre84 2015-11-26 06:15:02 UTC
Created attachment 2192 [details]
full initialiser list

Valgrind complains a lot about conditional jumps. Even if they might not harm, they are easy to fix and shorten the valgrind output drastically, so that other errors can be identified more easily.

In file animproperty_browser.cpp, there are several member pointers not initialised in the constructor initialiser-list. See the attachment for a full list, which is, however, not in the correct order and causes --Wreorder warnings. Sorry about that, it was only a quick fix.


Lots of warnings are produced by a single line:
animatormode.cpp, Line 1636:

--------------
BackgroudImageProperties_t
AnimatorMode::getBackgroundProperties ()
{
  QGraphicsPixmapItem * background =  AnimatorScene::getInstance ()->getBackgroundImage ();
  BackgroudImageProperties_t prop; //<- THIS LINE; POSSIBLE 'FIX': = {"", 0, 0, 0, 0, 0}; 
  
  if (!background)
    return prop;
--------------

If no background is set, an uninitialised BackgroudImageProperties_t struct will be returned. I don't know which default settings make sense, so my 'fix'  is just to quiet valgrind.
Comment 1 John Abraham 2015-11-26 13:26:23 UTC
Thanks 
http://code.nsnam.org/netanim/rev/1dcf2ba6fe7a