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


On Sun, Sep 11, 2011 at 10:53:45PM +0200, Julien Nabet wrote:

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 :


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

Looks good to me. Commit!

(The incorrect code did not lead to any actual bug because the
function is only called with a pointer to a bool of value false and
the setting to true happened nicely with dereference; obviously, it
was a bug waiting to happen as soon as some code somewhere calls the
function with a pointer to a true bool...)

-- 
Lionel

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.