diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-07-15 23:16:05 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-07-15 23:29:47 +0200 |
commit | 22fa63a4fac7e86bc199092c48f0d2954435bf46 (patch) | |
tree | 2dd8c9c239dcbf639c7c4e41ee049193131c6794 /python3 | |
parent | b673ba2b2a52e77d6a71cb0725b067df6eb0ff2f (diff) |
compiler plugin warning about unwanted silent pointer-to-bool conversions
C/C++ silently converts pointers to booleans, which is presumably seen as
a good idea by lazy people, but it can occassionally silently break code
in strange ways, most notably by selecting a bool overload when no matching
overload for the pointer exists (OUStringBuffer::append() can break like that,
e.g. in ba37e4062f538db7e51d6a64ba544eeddbc567cf, other cases are
8e3bf1598fa95ac8d099e45ae4252e7654a6f590 or 28e4c0250e67a344b4d6088bdca2e680a4bffad0).
So far the plugin checks only conversions in function call arguments, there's
disabled code that could check more places, but I'm not aware so far of any place
where anything actually broke because of that, and it'd require fixups to be
explicit in some places (e.g. 'bool b = returns_pointer();' would require '!= NULL'
added), so for it'll be only the simple various and it can be made more strict if wanted.
Change-Id: I6a5d207daf925e6c2d1bf684060536795ecfcc35
Diffstat (limited to 'python3')
0 files changed, 0 insertions, 0 deletions