Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

attached patch fix this WaE:

[ build CXX ] test/source/sheet/xcellrangereferrer.cxx
/home/david/projects/libreoffice-core/git/libo/solver/unxlngx6.pro/inc/test/xmldiff.hxx: In member function 'bool XMLDiff::compareAttributes(xmlNodePtr, xmlNodePtr)': /home/david/projects/libreoffice-core/git/libo/solver/unxlngx6.pro/inc/test/xmldiff.hxx:43:28: error: 'tol.tolerance::attribName' may be used uninitialized in this function [-Werror=uninitialized] /home/david/projects/libreoffice-core/git/libo/test/source/diff/diff.cxx:248:23: note: 'tol.tolerance::attribName' was declared here /home/david/projects/libreoffice-core/git/libo/solver/unxlngx6.pro/inc/test/xmldiff.hxx:42:29: error: 'tol.tolerance::elementName' may be used uninitialized in this function [-Werror=uninitialized] /home/david/projects/libreoffice-core/git/libo/test/source/diff/diff.cxx:248:23: note: 'tol.tolerance::elementName' was declared here
cc1plus: all warnings being treated as errors

Ciao
David
From 7d096b45a1dd9f92703cef2fc3f9e5603630689d Mon Sep 17 00:00:00 2001
From: David Ostrovsky <David.Ostrovsky@gmx.de>
Date: Sat, 28 Apr 2012 19:15:24 +0200
Subject: [PATCH] WaE: tolerance.elementName & tolerance.attribName may be
 used uninitialized

---
 test/inc/test/xmldiff.hxx |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/test/inc/test/xmldiff.hxx b/test/inc/test/xmldiff.hxx
index c092637..6c7026a 100644
--- a/test/inc/test/xmldiff.hxx
+++ b/test/inc/test/xmldiff.hxx
@@ -43,7 +43,11 @@ struct tolerance
         xmlFree(attribName);
     }
 
-    tolerance() {}
+    tolerance() 
+    {
+        elementName = NULL;
+        attribName = NULL;
+    }
 
     tolerance(const tolerance& tol)
     {
-- 
1.7.5.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.