ooo-build r14356 - in trunk: . patches/dev300
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14356 - in trunk: . patches/dev300
- Date: Mon, 20 Oct 2008 12:31:56 +0000 (UTC)
Author: thorstenb
Date: Mon Oct 20 12:31:56 2008
New Revision: 14356
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14356&view=rev
Log:
* patches/dev300/apply:
* patches/dev300/valgrind-fix-warnings.diff: fix a bunch of
valgrind warnings by moving stream reads below the place where
stream error is checked.
Added:
trunk/patches/dev300/valgrind-fix-warnings.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Mon Oct 20 12:31:56 2008
@@ -2706,6 +2706,7 @@
svx-debug-sdrolestreams.diff, thorsten
instset-macos-langpacks.diff, i#64937, cloph
sal-disable-backtrace.diff, thorsten
+valgrind-fix-warnings.diff, i#95197, thorsten
[ MinGW ]
Added: trunk/patches/dev300/valgrind-fix-warnings.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/valgrind-fix-warnings.diff Mon Oct 20 12:31:56 2008
@@ -0,0 +1,77 @@
+en passant fixes of a few valgrind warnings
+
+From: Thorsten Behrens <thb openoffice org>
+
+
+---
+
+ vcl/source/gdi/cvtsvm.cxx | 13 ++++++++-----
+ vcl/source/gdi/impgraph.cxx | 2 +-
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+
+diff --git vcl/source/gdi/cvtsvm.cxx vcl/source/gdi/cvtsvm.cxx
+index f226fbe..231e605 100644
+--- vcl/source/gdi/cvtsvm.cxx
++++ vcl/source/gdi/cvtsvm.cxx
+@@ -408,9 +408,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
+ rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+
+ char aCode[ 5 ];
+- MapMode aMapMode;
+ Size aPrefSz;
+- INT32 nActions;
+ INT16 nSize;
+ INT16 nVersion;
+
+@@ -420,11 +418,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
+ rIStm >> nVersion; // Version
+ rIStm >> aPrefSz.Width(); // PrefSize.Width()
+ rIStm >> aPrefSz.Height(); // PrefSize.Height()
+- ImplReadMapMode( rIStm, aMapMode ); // MapMode
+- rIStm >> nActions; // Action count
+
+ // Header-Kennung und Versionsnummer pruefen
+- if( ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 ) || ( nVersion != 200 ) )
++ if( rIStm.GetError()
++ || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
++ || ( nVersion != 200 ) )
+ {
+ rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
+ rIStm.SetNumberFormatInt( nOldFormat );
+@@ -432,17 +430,22 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
+ }
+ else
+ {
++ MapMode aMapMode;
+ Polygon aActionPoly;
+ Rectangle aRect;
+ Point aPt, aPt1;
+ Size aSz;
+ Color aActionColor;
+ INT32 nTmp, nTmp1, nActionSize;
++ INT32 nActions;
+ INT16 nType;
+
+ sal_uInt32 nUnicodeCommentStreamPos = 0;
+ INT32 nUnicodeCommentActionNumber = 0;
+
++ ImplReadMapMode( rIStm, aMapMode ); // MapMode
++ rIStm >> nActions; // Action count
++
+ rMtf.SetPrefSize( aPrefSz );
+ rMtf.SetPrefMapMode( aMapMode );
+
+diff --git vcl/source/gdi/impgraph.cxx vcl/source/gdi/impgraph.cxx
+index 03a1563..31975d5 100644
+--- vcl/source/gdi/impgraph.cxx
++++ vcl/source/gdi/impgraph.cxx
+@@ -1504,7 +1504,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
+ // read Id
+ rIStm >> nTmp;
+
+- if( NATIVE_FORMAT_50 == nTmp )
++ if( !rIStm.GetError() && NATIVE_FORMAT_50 == nTmp )
+ {
+ Graphic aGraphic;
+ GfxLink aLink;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]