[Lldb-commits] [PATCH] D131615: [LLDB][NFC] Reliability fixes for IOHandlerCursesGUI

Slava Gurevich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 11 00:40:56 PDT 2022


fixathon added a comment.

Responded to comments



================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:391-394
+  uint32_t GetMaxX() const { return getmaxx(m_window); }
+  uint32_t GetMaxY() const { return getmaxy(m_window); }
+  uint32_t GetWidth() const { return GetMaxX(); }
+  uint32_t GetHeight() const { return GetMaxY(); }
----------------
fixathon wrote:
> clayborg wrote:
> > the underlying curses functions return "int". Were there places where people were comparing them to unsigned?
> A function HorizontalLine() at line 2582 requires non-negative input. Good point about the underlying function possibly returning a negative still.
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);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131615/new/

https://reviews.llvm.org/D131615



More information about the lldb-commits mailing list