On Thursday 13 of December 2012, Michael Meeks wrote:
Personally, I don't see a clean solution beyond reading each of the
call sites to those operators. If we want to take the risk of busting
things - personally I'd prefer zeroing the data: it has a much lower
risk/down-side as far as I can see. Then again - the ideal is clearly to
do the work of code cleanup & audit - that's fairly mindless busy-work
that just needs to be done carefully.
I think it shouldn't be that difficult to write a Clang plugin that finds all
uses of SvStream::operator<</>> , checks whether the variable read to is
initalized [*] , and possibly it shouldn't be even that big deal to have it
rewrite them to a series of SvStream::readInt32() etc. calls (i.e. EasyHack
fdo#56110). I have not written yet any howto on plugins besides the examples
under compilerplugins/, but if there would be interest, I could do something.
[*] Or, since I assume all those variables have been needlessly initialized
just in attempt to silence the broken warning with the wretched gcc thing on
Apple, the check will need to be more complicated and find if the initializer
is not the default value for the type.
--
Lubos Lunak
l.lunak@suse.cz
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.