Invalid condition in ProcessGDBRemote.cpp and other warnings

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 :wink:

                        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).

PluginManager.patch (4.13 KB)

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 :wink:

                       uint32_t offset = Args::StringToUInt32(value.c_str(), UINT32_MAX, 0);
                       if (offset != offset)

Perhaps reg_offset != offset?

-Chris

Thanks Jean-Daniel, I applied your patch to PluginManager.cpp as-is and fixed the ProcessGDBRmote.cpp bug you spotted.

J