To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=49385
Issue #:|49385
Summary:|sw: warning: uninitialized variable is used
Component:|Word processor
Version:|680m100
Platform:|PC
URL:|
OS/Version:|Linux
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|mru
Reported by:|pmladek
------- Additional comments from [EMAIL PROTECTED] Tue May 17 05:41:08 -0700
2005 -------
The new gcc-4.0-pre has a better detection of problems with uninitialized
variables and prints the new "warning: FOO is used uninitialized". We are going
through this warnings because there is a higher chance that the code is really
broken.
The following problems were found in the module sw:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sw/source/filter/basflt/fltini.cxx:
In member function âvirtual ULONG Sw3Writer::WriteStorage()â:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sw/source/filter/basflt/fltini.cxx:428:
warning: ânRetâ is used uninitialized in this function
The method Sw3Writer::WriteStorage is defined the following way:
ULONG Sw3Writer::WriteStorage()
{
ULONG nRet; /*
if( pIO )
{
// der gleiche Storage -> Save, sonst SaveAs aufrufen
if( !bSaveAs )
nRet = pIO->Save( pOrigPam, bWriteAll );
else
nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll );
pIO = 0; // nach dem Schreiben ist der Pointer
ungueltig !!
}
else
{
ASSERT( !this, "Sw3-Writer ohne IO-System" )
nRet = ERR_SWG_WRITE_ERROR;
}*/
return nRet;
}
So, all the code is commented out, just a random value is returned.
I am not sure what is the right fix. I am even not sure if this code is used at
all. But it looks suspicious in each case.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]