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

2014-05-01 Thread Caolán McNamara
 include/cppuhelper/weak.hxx |1 +
 include/osl/file.hxx|9 -
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 66a777c3d4c926aa2bd3d40da4852e769ad6ddc2
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Apr 30 21:12:09 2014 +0100

coverity#707976 Uninitialized pointer field

Change-Id: I6e62d97dc1c7020320aa9a0b58a692ca2dc6f617

diff --git a/include/osl/file.hxx b/include/osl/file.hxx
index a797da0..7dfafdc 100644
--- a/include/osl/file.hxx
+++ b/include/osl/file.hxx
@@ -680,16 +680,15 @@ public:
 @param nMask
 Set of flags decribing the demanded information.
 */
-
-FileStatus( sal_uInt32 nMask ): _nMask( nMask )
+FileStatus(sal_uInt32 nMask)
+: _nMask(nMask)
 {
-_aStatus.uStructSize = sizeof( oslFileStatus );
-memset( _aStatus.uValidFields, 0, sizeof( oslFileStatus ) - sizeof( 
sal_uInt32 ) );
+memset(_aStatus, 0, sizeof(_aStatus));
+_aStatus.uStructSize = sizeof(_aStatus);
 }
 
 /** Destructor.
 */
-
 ~FileStatus()
 {
 if ( _aStatus.ustrFileURL )
commit aa668984f6a1f6e5c4d3d23dc89bab59f66baa5c
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Apr 30 21:04:14 2014 +0100

coverity#707714: Uninitialized pointer

Change-Id: I98e21ad28ea31bae41894d1804cbafe0c247035d

diff --git a/include/cppuhelper/weak.hxx b/include/cppuhelper/weak.hxx
index dcddbb6..03399fe 100644
--- a/include/cppuhelper/weak.hxx
+++ b/include/cppuhelper/weak.hxx
@@ -102,6 +102,7 @@ public:
 inline OWeakObject() SAL_THROW(())
 : m_refCount( 0 )
 , m_pWeakConnectionPoint( 0 )
+, m_pReserved(0)
 {}
 #endif
 /** Dummy copy constructor.  Set the reference count to zero.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-03-08 Thread Norbert Thiebaud
 include/cppuhelper/weak.hxx |3 ++-
 include/osl/file.hxx|5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1b6e87fc232e78790d45a54b7a4ac7fe02d2c587
Author: Norbert Thiebaud nthieb...@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 nthieb...@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.
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits