74 lines
2.1 KiB
Diff
74 lines
2.1 KiB
Diff
From 638f672ce619abe322306c9f1f422dc988978e57 Mon Sep 17 00:00:00 2001
|
|
From: Miroslav Lichvar <mlichvar@redhat.com>
|
|
Date: Oct 01 2019 17:13:55 +0000
|
|
Subject: fix warnings about never-read values
|
|
|
|
Conflict: NA
|
|
Reference: https://pagure.io/newt/c/638f672ce619abe322306c9f1f422dc988978e57.patch
|
|
---
|
|
|
|
diff --git a/grid.c b/grid.c
|
|
index 5b4b120..6f79ce4 100644
|
|
--- a/grid.c
|
|
+++ b/grid.c
|
|
@@ -158,7 +158,6 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) {
|
|
|
|
thisTop = top;
|
|
for (row = 0; row < grid->rows; row++) {
|
|
- i = 0;
|
|
thisLeft = left;
|
|
for (col = 0; col < grid->cols; col++) {
|
|
field = &grid->fields[col][row];
|
|
diff --git a/listbox.c b/listbox.c
|
|
index 6177c07..aae4f83 100644
|
|
--- a/listbox.c
|
|
+++ b/listbox.c
|
|
@@ -758,7 +758,7 @@ static void listboxDestroy(newtComponent co) {
|
|
struct listbox * li = co->data;
|
|
struct items * item, * nextitem;
|
|
|
|
- nextitem = item = li->boxItems;
|
|
+ item = li->boxItems;
|
|
|
|
while (item != NULL) {
|
|
nextitem = item->next;
|
|
diff --git a/newt.c b/newt.c
|
|
index 0a6ca91..c1dd916 100644
|
|
--- a/newt.c
|
|
+++ b/newt.c
|
|
@@ -873,8 +873,6 @@ void newtPopWindowNoRefresh(void) {
|
|
if (currentWindow == NULL)
|
|
return;
|
|
|
|
- row = col = 0;
|
|
-
|
|
row = currentWindow->top - 1;
|
|
col = currentWindow->left - 2;
|
|
if (row < 0)
|
|
diff --git a/whiptail.c b/whiptail.c
|
|
index 7932d8b..627f1ee 100644
|
|
--- a/whiptail.c
|
|
+++ b/whiptail.c
|
|
@@ -346,7 +346,7 @@ int main(int argc, const char ** argv) {
|
|
int fullButtons = 0;
|
|
int outputfd = 2;
|
|
int topLeft = 0;
|
|
- FILE *output = stderr;
|
|
+ FILE *output;
|
|
char * result;
|
|
char ** selections, ** next;
|
|
char * title = NULL;
|
|
diff --git a/windows.c b/windows.c
|
|
index f1381ae..29566a6 100644
|
|
--- a/windows.c
|
|
+++ b/windows.c
|
|
@@ -220,7 +220,6 @@ int newtWinEntries(char * title, char * text, int suggestedWidth, int flexDown,
|
|
|
|
for (numItems = 0; items[numItems].text; numItems++);
|
|
|
|
- buttonName = button1;
|
|
va_start(args, button1);
|
|
for (buttonName = button1; buttonName; buttonName = va_arg(args, char *))
|
|
++totalButtons;
|
|
|