summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-17 09:03:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-17 09:10:52 +0000
commit9a55875ef4c466a4f176c3896c3cf7232b56c0bc (patch)
tree81adcc99a2af500062c7c06332b7500a5b739780 /basic
parent7ee2857ab5daa791d36615d149ee562020b883eb (diff)
coverity#707496 Uninitialized scalar variable
also... coverity#707497 Uninitialized scalar variable Change-Id: Ie3ac361685a52b23e088b78404ea4e013407fe2a
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx5
1 files changed, 3 insertions, 2 deletions
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 );