This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Cast -1 (as invalid socket) to the socket type before comparing
ClosedPublic

Authored by mstorsjo on Sep 20 2019, 1:50 PM.

Details

Summary

This silences warnings about comparison of integers between unsigned long long (which is what the Windows SOCKET type is) and signed int when building in MinGW mode.

Diff Detail

Event Timeline

mstorsjo created this revision.Sep 20 2019, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2019, 1:50 PM
compnerd added inline comments.Sep 20 2019, 2:32 PM
lldb/source/Host/common/Socket.cpp
478–479

Could you use C++ style casts please?

mstorsjo updated this revision to Diff 221122.Sep 20 2019, 2:54 PM

Use static_cast.

compnerd accepted this revision.Sep 20 2019, 5:39 PM
This revision is now accepted and ready to land.Sep 20 2019, 5:39 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2019, 12:09 PM