Denis Barbier Thu, 08/04/2011 - 13:41 Forums: Other usage issuesFixes warnings like : (potentially) uninitialized local variable 'name' used Contributed by: QbProg, Thomas Paviot Depends on: 01-remove-__try-__finally.patch Attachments: 19-potentially-uninitialized-variable.patch Pawel Thu, 08/04/2011 - 13:52 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 Log in to post comments Denis Barbier Fri, 08/05/2011 - 16:23 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. Log in to post comments
Thu, 08/04/2011 - 13:52
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
Fri, 08/05/2011 - 16:23
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.