[Libreoffice] [Review] simple bugfix (too simple ?)

Julien Nabet serval2412 at yahoo.fr
Sun Sep 11 13:53:45 PDT 2011


Hello,

Cppcheck detected this :
core/jvmfwk/source/elements.cxx
127    assignBoolToPointer    error    Assigning bool value to pointer 
(converting bool value to address)

Here is a simple patch :

diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index bb5cf62..b54e380 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -124,7 +124,7 @@ void createSettingsStructure(xmlDoc * document, bool 
* bNeedsSave)
      }
      if (bFound)
      {
-        bNeedsSave = false;
+        *bNeedsSave = false;
          return;
      }
      //We will modify this document

Too simple to be true ? I prefer asking instead of having missed a 
"special C++ trick".

Julien.
(As usual, I can of course commit and push it on master if it's ok).


More information about the LibreOffice mailing list