On 01/19/2013 05:35 PM, julien2412 wrote:
Cppcheck reported this:
<error file="tools/source/fsys/fstat.cxx" line="112"
id="redundantAssignment" severity="style" msg="Variable 'nMode' is
reassigned a value before the old one has been used."/>
<error file="tools/source/fsys/fstat.cxx" line="113"
id="redundantAssignment" severity="style" msg="Variable 'nMode' is
reassigned a value before the old one has been used."/>
Indeed, we can see this:
109 if (bRO)
110 {
111 nMode = aBuf.st_mode & ~S_IWUSR;
112 nMode = aBuf.st_mode & ~S_IWGRP;
113 nMode = aBuf.st_mode & ~S_IWOTH;
114 }
This apparently wants to remove all the write permission bits from the
following chmod call, so should better read
nMode = aBuf.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH);
Stephan
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.