To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=49381
Issue #:|49381
Summary:|sd: warning: uninitialized variable is used
Component:|Drawing
Version:|680m100
Platform:|PC
URL:|
OS/Version:|Linux
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|wg
Reported by:|pmladek
------- Additional comments from [EMAIL PROTECTED] Tue May 17 04:54:55 -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 sd:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sd/source/ui/view/ViewShellImplementation.cxx:
In member function âvoid
sd::ViewShell::Implementation::ProcessModifyPageSlot(SfxRequest&, SdPage*,
PageKind)â:
/usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sd/source/ui/view/ViewShellImplementation.cxx:273:
warning: âaOldAutoLayoutâ is used uninitialized in this function
The variable 'aOldAutoLayout' is used this way:
if(bShowDialog)
{
sal_Bool bNameChanged(aNewName != aOldName);
sal_Bool bLayoutChanged(aNewAutoLayout != aOldAutoLayout);
if(bNameChanged && !bLayoutChanged)
bShowDialog = sal_False;
}
but is is never initialized.
I think that it could be initialized this way:
aOldAutoLayout = pUndoPage->GetAutoLayout();
because the variable "aNewAutoLayout" is used to set the AutoLayout either for
pCurrentPage or for pHandoutMPage depending on bHandoutMode. And the variable
pUndoPage points to either pCurrentPage or pHandoutMPage depending on the same
variable bHandoutMode. So, I think that the commad above could be used to get
the old AutoLayout setting.
I'll attach a patch for this.
---------------------------------------------------------------------
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]