erack at redhat.com
Thu Nov 29 11:14:52 PST 2012
On Thursday, 2012-11-29 17:24:44 +0100, Stephan Bergmann wrote:
> Trying to build recent master on Windows with --enable-werror fails with
> >c:\lo\core\sc\source\filter\xml\xmlchangetrackingexporthelper.cxx(268) : warning C4701: potentially uninitialized local variable 'fTempValue' used
> >c:\lo\core\sc\source\filter\xml\xmlchangetrackingexporthelper.cxx(247) : warning C4701: potentially uninitialized local variable 'nIndex' used
<rant> grml.. can't that !@#$%^&*() platform not at least preserve case
of file names in error output if it already insists to use \ instead of
/ ... but that's consistency, it ensures one can use nothing to paste
and invoke the editor on a different platform.. </rant>
> and looking at ScChangeTrackingExportHelper::SetValueAttributes,
> SvNumberFormatter::IsNumberFormat etc., it is not clear to me at all
> whether the former will use nIndex and fTempValue only in situations
> where it is guaranteed that the latter has set their values.
nIndex needs to be initialized for IsNumberFormat(), usually 0 for
current locale and general number format, if it isn't the method assumes
an arbitrary number format it tries to match against if general
detection fails. Fortunately chances are that these arbitrary cases
mostly would fail as well.. fTempValue is initialized in
IsNumberFormat(), either to the number if it could parse some number and
returned true, or to 0.0 if it returned false. However, it doesn't hurt
to initialize also that.
Thanks for the heads-up
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the LibreOffice