From dca65d1a2389ed2cafca37828fe78de46758d37c Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 30 Jun 2008 06:14:25 +0300 Subject: dselect: Fix compilation warnings Surround boolean expressions with parenthesis. Switch a for with an empty body into a while. --- dselect/basecmds.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dselect/basecmds.cc') diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc index f76bc09dc..7ed3c39fb 100644 --- a/dselect/basecmds.cc +++ b/dselect/basecmds.cc @@ -155,7 +155,6 @@ void baselist::displayerror(const char* str) { void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { - const struct helpmenuentry *hme; int maxx, maxy, i, y, x, nextkey; getmaxyx(stdscr,maxy,maxx); @@ -163,7 +162,9 @@ void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { clearok(stdscr,TRUE); for (;;) { werase(stdscr); - for (hme= helpmenu; hme->key && hme->key != key; hme++); + const struct helpmenuentry *hme = helpmenu; + while (hme->key && hme->key != key) + hme++; if (hme->key) { attrset(helpscreen_attr); mvaddstr(1,0, gettext(hme->msg->text)); -- cgit v1.2.3