Fix the fill_clamp() function to handle signed source types. Make sure
that the source value is always non-negative, and cast it to unsigned
when verifying the upper bound. This fixes compiler warnings about
comparing unsigned and signed types.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
776 | T will always be unsigned here, right? May not hurt to add a static_assert for that, mainly to avoid people wondering if this logic is correct... |
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
776 | Yes, and that makes the logic much simpler. I'll add the assert. Thanks! |
T will always be unsigned here, right? May not hurt to add a static_assert for that, mainly to avoid people wondering if this logic is correct...