[Libreoffice-commits] core.git: cppcanvas/source
Tor Lillqvist
tlillqvist at suse.com
Tue Mar 19 01:46:27 PDT 2013
cppcanvas/source/mtfrenderer/emfplus.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit fe8eba5faa59ddf9ee82f3eb009daac72a0ec846
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Mar 19 10:43:45 2013 +0200
WaE: Potentially uninitialized local variable
Change-Id: I497c30dfd951132fe2f7998a158b6c14efe5ebf7
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 011a204..3f787e1 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1337,7 +1337,14 @@ namespace cppcanvas
case EmfPlusRecordTypeDrawEllipse:
case EmfPlusRecordTypeFillEllipse:
{
- sal_uInt32 brushIndexOrColor;
+ // Intentionally very bogus initial value
+ // to avoid MSVC complaining about
+ // potentially uninitialized local
+ // variable. As long as the code stays as
+ // intended, this variable will be
+ // assigned a (real) value in the case
+ // when it is later used.
+ sal_uInt32 brushIndexOrColor = 1234567;
if ( type == EmfPlusRecordTypeFillEllipse )
rMF >> brushIndexOrColor;
More information about the Libreoffice-commits
mailing list