Skip to content

Commit 152efc4

Browse files
Sterling-Augustinememfrob
authored andcommitted
Remove unused variable "saved_opts".
wattr_get is a macro, and the documentation states: "The parameter opts is reserved for future use, applications must supply a null pointer." In practice, passing a variable there is harmless, except that it is unused inside the macro, which causes unused variable warnings. The various places where
1 parent 4af943e commit 152efc4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lldb/source/Core/IOHandlerCursesGUI.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,7 @@ class Window {
485485
bool use_blue_background) {
486486
attr_t saved_attr;
487487
short saved_pair;
488-
int saved_opts;
489-
wattr_get(m_window, &saved_attr, &saved_pair, &saved_opts);
488+
wattr_get(m_window, &saved_attr, &saved_pair, nullptr);
490489
if (use_blue_background)
491490
::wattron(m_window, COLOR_PAIR(WhiteOnBlue));
492491
while (!string.empty()) {
@@ -522,7 +521,7 @@ class Window {
522521
continue;
523522
}
524523
if (value == 0) { // Reset.
525-
wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
524+
wattr_set(m_window, saved_attr, saved_pair, nullptr);
526525
if (use_blue_background)
527526
::wattron(m_window, COLOR_PAIR(WhiteOnBlue));
528527
} else {
@@ -531,7 +530,7 @@ class Window {
531530
COLOR_PAIR(value - 30 + 1 + (use_blue_background ? 8 : 0)));
532531
}
533532
}
534-
wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
533+
wattr_set(m_window, saved_attr, saved_pair, nullptr);
535534
}
536535

537536
void Touch() {

0 commit comments

Comments
 (0)