Page MenuHomePhabricator

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

Authored by mstorsjo on Fri, Sep 20, 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

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Fri, Sep 20, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Sep 20, 1:50 PM
compnerd added inline comments.Fri, Sep 20, 2:32 PM
lldb/source/Host/common/Socket.cpp
479 ↗(On Diff #221109)

Could you use C++ style casts please?

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

Use static_cast.

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