Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Stephan,

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.

Fixed with
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=954ce6f102855be1bd5c84432003d529773b39a8

Thanks for the heads-up

  Eike

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

Attachment: pgpk01zqxJnAg.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.