Import 2017-06-07 23:51:09: master dee8bfa3

Author Committer Branch Timestamp Parent
jcfr jcfr master 2014-07-16 00:20:01 master 5726de21
Changeset

BUG: Fix valgrind issues in vtkMRMLVolumeNodeTest1

This commit fixes regression introduced by commit r19917. Instead
of re-implementing Get{I,J,K}ToRASDirection methods, the
macro "TEST_SET_GET_VECTOR3_DOUBLE_RANDOM" has been updated to directly
use the Set/Get method of the object. It then (1) avoids to return a
pointer and (2) avoids to access possibly uninitialized value with the
bracket operator.

Valgrind errors like this one are fixed:

[...]

==20657== Conditional jump or move depends on uninitialised value(s)
==20657== at 0x626297: vtkMRMLVolumeNodeTest1(int, char**) (vtkMRMLVolumeNodeTest1.cxx:114)
==20657== by 0x4717DC: main (MRMLCoreCxxTests.cxx:616)

[...]

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23440 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Core/Testing/vtkMRMLVolumeNodeTest1.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLCoreTestingMacros.h Diff File