[lldb-dev] Invalid condition in ProcessGDBRemote.cpp and other warnings

Jean-Daniel Dupas devlists at shadowlab.org
Fri Jun 11 14:45:38 PDT 2010


I'm trying to compile lldb with clang++, and it look like it found a bug:

lldb/source/Plugins/Process/../../../source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:248:36: warning: self-comparison always evaluates to false

I don't know what it should be, but I'm almost sure that 'offset != offset' is not what the author expected in the first place ;-)

                        uint32_t offset = Args::StringToUInt32(value.c_str(), UINT32_MAX, 0);
                        if (offset != offset)
                        {
                            reg_offset = offset;
                            reg_info.byte_offset = offset;
                        }

I also attach a patch to cleanup PluginManager.cpp which contains a bunch of useless typedef and return false instead of NULL in a couple of functions (fixes clang++ warnings).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PluginManager.patch
Type: application/octet-stream
Size: 4231 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20100611/608e1821/attachment.obj>
-------------- next part --------------


-- Jean-Daniel






More information about the lldb-dev mailing list