From 9a55875ef4c466a4f176c3896c3cf7232b56c0bc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Feb 2013 09:03:50 +0000 Subject: coverity#707496 Uninitialized scalar variable also... coverity#707497 Uninitialized scalar variable Change-Id: Ie3ac361685a52b23e088b78404ea4e013407fe2a --- basic/source/runtime/methods.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'basic') diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index b9a286127c2c..aeba267552a5 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1952,7 +1952,7 @@ RTLFUNC(DateValue) SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n ); } - sal_uInt32 nIndex; + sal_uInt32 nIndex = 0; double fResult; OUString aStr( rPar.Get(1)->GetOUString() ); sal_Bool bSuccess = pFormatter->IsNumberFormat( aStr, nIndex, fResult ); @@ -1967,6 +1967,7 @@ RTLFUNC(DateValue) { // Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value; SvNumberFormatter aFormatter( comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US ); + nIndex = 0; bSuccess = aFormatter.IsNumberFormat( aStr, nIndex, fResult ); nType = aFormatter.GetType( nIndex ); } @@ -2019,7 +2020,7 @@ RTLFUNC(TimeValue) SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n ); } - sal_uInt32 nIndex; + sal_uInt32 nIndex = 0; double fResult; sal_Bool bSuccess = pFormatter->IsNumberFormat( rPar.Get(1)->GetOUString(), nIndex, fResult ); -- cgit