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

Author Committer Branch Timestamp Parent
jcfr jcfr master 2017-03-12 15:44:19 master 862391ef
Changeset

COMP: qMRMLModelDisplayNodeWidget.cxx: Fix -Wsometimes-uninitialized

/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:483:7: warning: variable 'newMin' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (precision != 0.0)
^~~~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:499:43: note: uninitialized use occurs here
d->DisplayedScalarRangeWidget->setRange(newMin, newMax);
^~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:483:3: note: remove the 'if' if its condition is always true
if (precision != 0.0)
^~~~~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:480:16: note: initialize the variable 'newMin' to silence this warning
double newMin;
^
= 0.0
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:483:7: warning: variable 'newMax' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (precision != 0.0)
^~~~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:499:51: note: uninitialized use occurs here
d->DisplayedScalarRangeWidget->setRange(newMin, newMax);
^~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:483:3: note: remove the 'if' if its condition is always true
if (precision != 0.0)
^~~~~
/path/to/Slicer/Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx:481:16: note: initialize the variable 'newMax' to silence this warning
double newMax;
^
= 0.0

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

mod - Modules/Loadable/Models/Widgets/qMRMLModelDisplayNodeWidget.cxx Diff File