- checking retval of function calls
- signed/unsigned mismatch
- dead code removal
- null dereference fix
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Core/IOHandlerCursesGUI.cpp | ||
---|---|---|
394–395 | the underlying curses functions return "int". Were there places where people were comparing them to unsigned? |
Responded to comments
lldb/source/Core/IOHandlerCursesGUI.cpp | ||
---|---|---|
394–395 | I took another look, and I am not sure what the complaint is. Both the HorizontalLine() and its underlying call to ::whline take input typed as "signed int". Perhaps ::whline is unable to handle negative input? void HorizontalLine(int n, chtype h_char = ACS_HLINE) { ::whline(m_window, h_char, n); } |
lldb/source/Core/IOHandlerCursesGUI.cpp | ||
---|---|---|
394–395 | Not sure either. I don't want to change these as they should return "int" like the original API. | |
2582 | But surface.HorizontalLine(...) function takes an "int", and now we are passing it a uint32_t. If this function requires a >= 0 value, it should do the check internally |
Addressed the comments. Will deal with the signed/unsigned issue in a separate diff if still needed.
lldb/source/Core/IOHandlerCursesGUI.cpp | ||
---|---|---|
2582 | I agree. I've reverted the function signatures back to signed int and will revisit the signed/unsigned issue in another diff. |
the underlying curses functions return "int". Were there places where people were comparing them to unsigned?