This is an archive of the discontinued LLVM Phabricator instance.

Quash a few 'warning: comparison of function 'compression_decode_buffer' not equal to a null pointer is always true [-Wtautologica l-pointer-compare]'
AbandonedPublic

Authored by hintonda on Nov 2 2017, 4:50 PM.

Details

Reviewers
jasonmolenda
Summary

Quash several warnings of this type using clang's suggested fix:

[2741/3631] Building CXX object tools/lldb/source/Plugins/Process/gdb-remote/CMakeFiles/lldbPluginProcessGDBRemote.dir/GDBRemoteCommunication.cpp.o
/Users/dhinton/projects/llvm_project/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:603:7: warning: comparison of function 'compression_decode_buffer' not equal to a null pointer is always true [-Wtautological-pointer-compare]

if (compression_decode_buffer != NULL &&
    ^~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~

/Users/dhinton/projects/llvm_project/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:603:7: note: prefix with the address-of operator to silence this warning

if (compression_decode_buffer != NULL &&
    ^
    &

Event Timeline

hintonda created this revision.Nov 2 2017, 4:50 PM
hintonda abandoned this revision.Jan 27 2018, 7:33 PM