For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

[PATCH 19/25] Fix potentially uninitialized local variables

Denis Barbier's picture

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.


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.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.