[Libreoffice-commits] .: binfilter/bf_sw

Christian Lohmaier cloph at kemper.freedesktop.org
Sun Mar 27 16:20:39 PDT 2011


 binfilter/bf_sw/source/core/graphic/sw_grfatr.cxx |    4 ++--
 binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx |    4 ++--
 binfilter/bf_sw/source/core/unocore/sw_unomap.cxx |    2 +-
 binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx |    4 ++--
 binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit b68c636538b87807b8b2d90336a9e9a05496c40a
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon Mar 28 01:22:28 2011 +0200

    WaE - variable may be used uninitialized

diff --git a/binfilter/bf_sw/source/core/graphic/sw_grfatr.cxx b/binfilter/bf_sw/source/core/graphic/sw_grfatr.cxx
index 679b7c3..5920deb 100644
--- a/binfilter/bf_sw/source/core/graphic/sw_grfatr.cxx
+++ b/binfilter/bf_sw/source/core/graphic/sw_grfatr.cxx
@@ -211,7 +211,7 @@ SwCropGrf::SwCropGrf(sal_Int32 nL, sal_Int32 nR, sal_Int32 nT, sal_Int32 nB )
 /*N*/ {
 /*N*/     // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
 /*N*/     // where we still want this to be a sal_Int16
-/*N*/     sal_Int16 nValue;
+/*N*/ 	sal_Int16 nValue = 0;
 /*N*/ 	if (rVal >>= nValue)
 /*N*/ 	{
 /*N*/       // UINT16 argument needed
@@ -311,7 +311,7 @@ SwCropGrf::SwCropGrf(sal_Int32 nL, sal_Int32 nR, sal_Int32 nT, sal_Int32 nB )
 /*N*/ {
 /*N*/ 	//temporary conversion until this is a SfxInt16Item!
 /*N*/ 	DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
-/*N*/ 	sal_Int16 nVal;
+/*N*/ 	sal_Int16 nVal = 0;
 /*N*/ 	if(!(rVal >>= nVal) || nVal < -100 || nVal > 100)
 /*N*/ 		return FALSE;
 /*N*/     if(nVal < 0)
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
index 60f8fb4..57e385e 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx
@@ -93,7 +93,7 @@ String lcl_AnyToString(uno::Any rVal) throw(IllegalArgumentException)
 //-----------------------------------------------------------------------------
 sal_Int16 lcl_AnyToInt16(uno::Any rVal) throw(IllegalArgumentException)
 {
-    sal_Int16 nRet;
+    sal_Int16 nRet = 0;
     if(!(rVal >>= nRet))
         throw IllegalArgumentException();
     return nRet;
@@ -101,7 +101,7 @@ sal_Int16 lcl_AnyToInt16(uno::Any rVal) throw(IllegalArgumentException)
 //-----------------------------------------------------------------------------
 sal_Bool lcl_AnyToBool(uno::Any rVal) throw(IllegalArgumentException)
 {
-    sal_Bool bRet;
+    sal_Bool bRet = sal_False;
     if(!(rVal >>= bRet))
         throw IllegalArgumentException();
     return bRet;
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx b/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
index abd7a6f..033f93e 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
@@ -83,7 +83,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
 SfxItemPropertySet&	SwUnoPropertyMapProvider::GetPropertySet(sal_Int8 nPropSetId)
 {
     SfxItemPropertySet** ppMap = 0;
-    sal_uInt16 nPropertyId;
+    sal_uInt16 nPropertyId = 0;
     switch(nPropSetId)
     {
     case PROPERTY_SET_CHAR_STYLE:
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx b/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
index 63263a6..b5b9fa6 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
@@ -2419,7 +2419,7 @@ void SAL_CALL SwXTextTable::setDataArray(
                         lcl_setString( *pXCell, *(::rtl::OUString *) rAny.getValue() );
                     else
                     {
-                        double d;
+                        double d = 0.0;
                         if( !(rAny >>= d) )
                             throw uno::RuntimeException();
                         lcl_setValue( *pXCell, d );
@@ -3745,7 +3745,7 @@ void SAL_CALL SwXCellRange::setDataArray(
                         lcl_setString( *pXCell, *(::rtl::OUString *) rAny.getValue() );
                     else
                     {
-                        double d;
+                        double d = 0.0;
                         if( !(rAny >>= d) )
                             throw uno::RuntimeException();
                         lcl_setValue( *pXCell, d );
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
index 61716a4..6f53465 100644
--- a/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
+++ b/binfilter/bf_sw/source/filter/xml/sw_xmltexte.cxx
@@ -417,7 +417,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
     }
 
     SvULongs aParams;
-    enum XMLTokenEnum eElementName;
+    enum XMLTokenEnum eElementName = XML_TOKEN_INVALID;
     SvXMLExport &rLclExport = GetExport();
 
     // First the stuff common to each of Applet/Plugin/Floating Frame


More information about the Libreoffice-commits mailing list