vitaly
6th June 2006, 09:53
I use Qt 3.3.2, gcc 3.3.3. I wrote simple xml parsing test.
#include <qxml.h>
int main( int argc, char** argv)
{
QString s = "<xml></xml>";
QXmlInputSource input;
input.setData(s);
QXmlSimpleReader reader;
if (!reader.parse(&input, FALSE))
return 1;
return 0;
}
If to compile this test and run under valgrind the following warning will be shown:
==10134== Conditional jump or move depends on uninitialised value(s)
==10134== at 0x446B9CE: QXmlSimpleReader::parseElement() (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x446B200: QXmlSimpleReader::parseBeginOrContinue(int, bool) (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x446AEE1: QXmlSimpleReader::parse(QXmlInputSource const*, bool) (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x8048D52: main (main.cpp:<this line number points to reader.parse(..) string)
Is it Qt bug and how to avoid it?
Thanks,
Vitaly
#include <qxml.h>
int main( int argc, char** argv)
{
QString s = "<xml></xml>";
QXmlInputSource input;
input.setData(s);
QXmlSimpleReader reader;
if (!reader.parse(&input, FALSE))
return 1;
return 0;
}
If to compile this test and run under valgrind the following warning will be shown:
==10134== Conditional jump or move depends on uninitialised value(s)
==10134== at 0x446B9CE: QXmlSimpleReader::parseElement() (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x446B200: QXmlSimpleReader::parseBeginOrContinue(int, bool) (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x446AEE1: QXmlSimpleReader::parse(QXmlInputSource const*, bool) (in /usr/local/qt-3.3.2-3.3.3/lib/libqt-mt.so.3.3.2)
==10134== by 0x8048D52: main (main.cpp:<this line number points to reader.parse(..) string)
Is it Qt bug and how to avoid it?
Thanks,
Vitaly