cui/source/options/optaboutconfig.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit f96b23669e5ccb18f55e9041a774206b50406d2a Author: Tor Lillqvist <t...@collabora.com> Date: Mon Sep 9 20:52:08 2013 +0300 WaE: variables 'nDoub' and 'nFloat' are uninitialized when used here Initialise them in the presumably intended way to get rid of the warning. Note that the code around there is somewhat confused and downright wrong anyway, though. Also "+0", "-0" or "000" for instance are correct ways to write zero. Also SAL_MAX_INT32 and SAL_MIN_INT32 are legal values for a UNO "long". (And it will always be true that a sal_Int32 is <= SAL_MAX_INT32 and >= SAL_MIN_INT32.) And does the code accept any single-character string as zero? Then there is copy-paste galore for the "hyper", "double" and "float" cases. Change-Id: Ie1920cfb4d17dca7cd966d8b200d2510ea975290 diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index a1213d0..3de545f 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -506,7 +506,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl ) } else if( sPropertyType == OUString("double")) { - double nDoub; + double nDoub = sNewValue.toDouble(); if( !( nDoub ==0 && sNewValue.getLength()!=1 ) && nDoub < SAL_MAX_INT32 && nDoub > SAL_MIN_INT32) pProperty->Value = uno::makeAny( nDoub ); else @@ -514,7 +514,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl ) } else if( sPropertyType == OUString("float")) { - float nFloat; + float nFloat = sNewValue.toFloat(); if( !( nFloat ==0 && sNewValue.getLength()!=1 ) && nFloat < SAL_MAX_INT32 && nFloat > SAL_MIN_INT32) pProperty->Value = uno::makeAny( nFloat ); else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits