[Libreoffice-commits] core.git: 2 commits - include/cppuhelper include/osl

Norbert Thiebaud nthiebaud at gmail.com
Sat Mar 8 15:03:01 PST 2014


 include/cppuhelper/weak.hxx |    3 ++-
 include/osl/file.hxx        |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1b6e87fc232e78790d45a54b7a4ac7fe02d2c587
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 8 15:32:30 2014 -0600

    remove confusing and potentially dangerous premature-optimization
    
    Change-Id: Ia23f591519eba257441b725a219a1eddda937c39

diff --git a/include/osl/file.hxx b/include/osl/file.hxx
index 2518e5f..a53e3d7 100644
--- a/include/osl/file.hxx
+++ b/include/osl/file.hxx
@@ -432,10 +432,11 @@ public:
         Set of flags decribing the demanded information.
     */
 
-    VolumeInfo( sal_uInt32 nMask ): _nMask( nMask )
+    VolumeInfo( sal_uInt32 nMask )
+        : _nMask( nMask )
     {
+        memset( &_aInfo, 0, sizeof( oslVolumeInfo ));
         _aInfo.uStructSize = sizeof( oslVolumeInfo );
-        memset( &_aInfo.uValidFields, 0, sizeof( oslVolumeInfo ) - sizeof( sal_uInt32 ) );
         _aInfo.pDeviceHandle = &_aDevice._aHandle;
     }
 
commit 4c2f8fd74c43a7a85a931bfcf15654af12f082a8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Mar 8 11:12:35 2014 -0600

    coverity#707714: Uninitialized pointer
    
    Change-Id: Id8cf528f9c4ab76fda5be80d8fd44d7202a377d7

diff --git a/include/cppuhelper/weak.hxx b/include/cppuhelper/weak.hxx
index 4443eff..47f3d8d 100644
--- a/include/cppuhelper/weak.hxx
+++ b/include/cppuhelper/weak.hxx
@@ -112,8 +112,9 @@ public:
         : com::sun::star::uno::XWeak()
         , m_refCount( 0 )
         , m_pWeakConnectionPoint( 0 )
+        , m_pReserved(0)
         {
-        (void) rObj;
+            (void) rObj;
         }
     /** Dummy assignment operator. Does not affect reference count.
 


More information about the Libreoffice-commits mailing list