[PATCH 19/25] Fix potentially uninitialized local variables

Fixes warnings like : (potentially) uninitialized local variable 'name' used

Contributed by: QbProg, Thomas Paviot
Depends on: 01-remove-__try-__finally.patch

Pawel's picture

Hi Denis,

the patches for XmlMDataStd_NamedDataDriver.cxx initializing the 'aCurElement' only hide the real problem. The warning is fixed but the NULL-initialized variable is still accessed a couple of lines below:

aCurNode = aCurElement->getNextSibling();

The above line should probably be changed to:

aCurNode = anElement.getNextSibling();

but I haven't checked it.

Pawel

Denis Barbier's picture

Thanks Pawel, you are right, something has to be done. It could also be

aCurNode = aCurNode.getNextSibling();

I will file a separate bugreport for this issue.