[syslinux:master] com32/cmenu/libmenu/help.c: remove variables set but not used

syslinux-bot for H. Peter Anvin hpa at zytor.com
Wed Mar 16 13:18:39 PDT 2011


Commit-ID:  0171777467b905d60f0012a8eaceeb5992b379ed
Gitweb:     http://syslinux.zytor.com/commit/0171777467b905d60f0012a8eaceeb5992b379ed
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 16 Mar 2011 13:10:36 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Wed, 16 Mar 2011 13:10:36 -0700

com32/cmenu/libmenu/help.c: remove variables set but not used

gcc 4.6 warns on variables set but not used, so remove them.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/cmenu/libmenu/help.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/com32/cmenu/libmenu/help.c b/com32/cmenu/libmenu/help.c
index 0df1e10..ff917d9 100644
--- a/com32/cmenu/libmenu/help.c
+++ b/com32/cmenu/libmenu/help.c
@@ -54,10 +54,9 @@ static int countlines(char *buffer)
 static void printtext(char *buf, int from)
 {
     char *f, *t;
-    int right, nlines, i;
+    int nlines, i;
 
     // clear window to print
-    right = nc - HELP_RIGHT_MARGIN;
     nlines = nr - HELP_BODY_ROW - HELP_BOTTOM_MARGIN - 1;
 
     f = findline(buf, from);
@@ -66,7 +65,8 @@ static void printtext(char *buf, int from)
     if (*f == '\n')
 	f++;			// start of from+1st line
     t = f;
-    while (i < nlines) {
+
+    for (i = 0; i < nlines; i++) {
         gotoxy(HELP_BODY_ROW + i, HELP_LEFT_MARGIN);
         clear_end_of_line();
         putchar(SO);
@@ -83,7 +83,6 @@ static void printtext(char *buf, int from)
         }
         putchar('\n');
         t++;
-        i++;
     }
 }
 



More information about the Syslinux-commits mailing list