To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=49387 Issue #:|49387 Summary:|sch: warning: uninitialized variable is used Component:|Chart Version:|680m100 Platform:|PC URL:| OS/Version:|Linux Status:|NEW Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|code Assigned to:|kla Reported by:|pmladek
------- Additional comments from [EMAIL PROTECTED] Tue May 17 05:55:46 -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 sch: /usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sch/source/ui/dlg/tplabel.cxx: In member function âvirtual BOOL SchAxisLabelTabPage::FillItemSet(SfxItemSet&)â: /usr/src/packages/BUILD/ooo-build-1.9.100/build/src680-m100/sch/source/ui/dlg/tplabel.cxx:174: warning: âeOrientâ is used uninitialized in this function The variable âeOrientâ is used this way: BOOL SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { SvxChartTextOrient eOrient; ... BOOL bStacked = aOrientHlp.GetStackedState() == STATE_CHECK; if( bStacked != m_bInitialStacking ) { if( bStacked ) { eOrient = CHTXTORIENT_STACKED; rOutAttrs.Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, 0 ) ); } } if( eOrient != CHTXTORIENT_STACKED ) { ... It is set to CHTXTORIENT_STACKED only in some special cases but it is checked in all cases. It might look that there is a small chance that the variable is set to CHTXTORIENT_STACKED by default. I think that the chance is not so small because the method could be called more times and the value CHTXTORIENT_STACKED could be saved in the memory stack from the previous call. I'll attach a patch that initializes the variable. --------------------------------------------------------------------- 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]