To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=49351
                  Issue #:|49351
                  Summary:|sc: warning: uninitialized variable is used
                Component:|Spreadsheet
                  Version:|680m100
                 Platform:|PC
                      URL:|
               OS/Version:|Linux
                   Status:|NEW
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|code
              Assigned to:|spreadsheet
              Reported by:|pmladek





------- Additional comments from [EMAIL PROTECTED] Mon May 16 11:03:18 -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 sc:

/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:
In member function âvoid ScColumn::LoadNotes(SvStream&)â:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:458:
warning: ânPosâ is used uninitialized in this function
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:451:
warning: ânNoteCountâ is used uninitialized in this function
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:
In member function âvoid ScColumn::LoadData(SvStream&)â:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:178:
warning: ânNewCountâ is used uninitialized in this function
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/core/data/column2.cxx:194:
warning: ânNewRowâ is used uninitialized in this function

It seems that the code is really broken. For example, the variable nNewRow is
initialized this way:

#if SC_ROWLIMIT_STREAM_ACCESS 
#error address types changed! 
                rStream >> nNewRow;
#endif 

It means that it is never initialized, but it is used on many locations then.
The problem is very similar for the other variables as well.


Another problem is found here:

/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/ui/optdlg/tpview.cxx:
In member function âlong int ScTpContentOptions::CBHdl(CheckBox*)â:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sc/source/ui/optdlg/tpview.cxx:357:
warning: âeOptionâ is used uninitialized in this function

Well, it looks that this is not real problem. The variable eOption is probably
set everytime to a suitable value in the if-cases above. However, I think that
it could be initialized to a save value anyway.

I am sorry, I am not sure how to fix the above mentioned problems. I am afraid 
that especially the code in sc/source/core/data/column2.cxx could cause real
problems.

---------------------------------------------------------------------
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]

Reply via email to