]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
remove unused variables in test code
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Mar 2013 14:03:26 +0000 (15:03 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Mar 2013 14:05:31 +0000 (15:05 +0100)
test.c
testgrid.c
testtree.c

diff --git a/test.c b/test.c
index 03ea040e394ed93dad6afffde551f1c3b23b3797..5a6958c390e7334cc2be24a17731fab959d4cef2 100644 (file)
--- a/test.c
+++ b/test.c
@@ -34,7 +34,7 @@ void helpCallback(newtComponent co, void * tag) {
 
 int main(void) {
     newtComponent b1, b2, r1, r2, r3, e2, e3, l1, l2, l3, scale;
-    newtComponent lb, t, rsf, answer, timeLabel;
+    newtComponent lb, t, rsf, timeLabel;
     newtComponent cs[10];
     newtComponent f, chklist, e1;
     struct callbackInfo cbis[3];
@@ -129,7 +129,6 @@ int main(void) {
        if (es.reason == NEWT_EXIT_COMPONENT && es.u.co == b2) {
            newtScaleSet(scale, atoi(scaleVal));
            newtRefresh();
-           answer = NULL;
        } else if (es.reason == NEWT_EXIT_TIMER) {
            spinState++;
            if (!*spinState) spinState = spinner;
index a2aa3d27570c15806bcc4852bd9a84f9e09062af..7cc9dd72bb3352c1d0237e6c9125b3757a334173 100644 (file)
@@ -7,7 +7,7 @@
 
 int main(void) {
     newtComponent b1, b2, b3, b4;
-    newtComponent answer, f, t;
+    newtComponent f, t;
     newtGrid grid, subgrid;
     char * flowedText;
     int textWidth, textHeight, rc, i;
@@ -45,7 +45,7 @@ int main(void) {
     newtGridWrappedWindow(grid, "first window");
     newtGridFree(grid, 1);
 
-    answer = newtRunForm(f);
+    newtRunForm(f);
        
     newtFormDestroy(f);
     newtPopWindow();
@@ -79,7 +79,7 @@ int main(void) {
 
     f = newtForm(NULL, NULL, 0);
     newtFormAddComponents(f, b1, t, b2, NULL);
-    answer = newtRunForm(f);
+    newtRunForm(f);
 
     newtPopWindow();
     newtFormDestroy(f);
index 7f7e7a2207c3b89f95f617d80e63e8a140d3c3fe..0ae65c5ad0688b0f9067e685cad7e1a29cc968a1 100644 (file)
@@ -10,7 +10,6 @@ int main(void) {
     newtComponent checktree;
     newtComponent button;
     newtComponent form;
-    newtComponent answer;
     const void **result, **ptr;
     int numselected, i, j;
     int * list;
@@ -104,7 +103,7 @@ int main(void) {
     form = newtForm(NULL, NULL, 0);
     newtFormAddComponents(form, checktree, button, NULL);
 
-    answer = newtRunForm(form);
+    newtRunForm(form);
 
     newtFinished();