The following commit has been merged in the master branch: commit 9b2cc7aa3187091bf2cbbb734fb77a7c52bec969 Author: Guillem Jover <guil...@debian.org> Date: Sat Apr 30 21:03:16 2011 +0200
dselect: Mark ‘y’ variables as unused for getyx() and getmaxyx() The ncurses library does not provide a way to only retrieve the ‘x’ variable, so we have to pass a dummy ‘y’ which we are not going to use, for which the compiler emits a warning. diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc index d973f8c..3804475 100644 --- a/dselect/basecmds.cc +++ b/dselect/basecmds.cc @@ -159,7 +159,7 @@ void baselist::displayerror(const char* str) { void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { - int maxx, maxy, i, y, x, nextkey; + int maxx, maxy, i, nextkey; getmaxyx(stdscr,maxy,maxx); wbkgdset(stdscr, ' ' | helpscreen_attr); @@ -170,6 +170,8 @@ void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { while (hme->key && hme->key != key) hme++; if (hme->key) { + int x, y DPKG_ATTR_UNUSED; + attrset(helpscreen_attr); mvaddstr(1,0, gettext(hme->msg->text)); attrset(title_attr); diff --git a/dselect/baselist.cc b/dselect/baselist.cc index d272c10..cb876d7 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -332,7 +332,8 @@ void baselist::wordwrapinfo(int offset, const char *m) { waddnstr(infopad, m, l); waddch(infopad,'\n'); wrapping= 0; } else { - int x,y; + int x, y DPKG_ATTR_UNUSED; + if (wrapping) { getyx(infopad, y,x); if (x+1 >= usemax) { diff --git a/dselect/main.cc b/dselect/main.cc index 5c87b03..b00bb12 100644 --- a/dselect/main.cc +++ b/dselect/main.cc @@ -386,7 +386,7 @@ dme(int i, int so) gettext(me->option), gettext(me->menuent)); - int y,x; + int x, y DPKG_ATTR_UNUSED; getmaxyx(stdscr,y,x); attrset(so ? A_REVERSE : A_NORMAL); @@ -401,7 +401,7 @@ refreshmenu(void) curseson(); cbreak(); noecho(); nonl(); keypad(stdscr,TRUE); - int y,x; + int x, y DPKG_ATTR_UNUSED; getmaxyx(stdscr,y,x); clear(); diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc index bf370a8..67750b3 100644 --- a/dselect/pkgdisplay.cc +++ b/dselect/pkgdisplay.cc @@ -190,7 +190,7 @@ void packagelist::setwidths() { } void packagelist::redrawtitle() { - int x,y; + int x, y DPKG_ATTR_UNUSED; if (title_height) { mywerase(titlewin); -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org