[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 08 of 45] gcc-4.6 compile fix: tools/xenstat/xentop/xentop.c


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 19 May 2011 21:05:27 +0200
  • Delivery-date: Thu, 19 May 2011 12:14:51 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305824390 -7200
# Node ID c6ae952c7f405323de3e07f74d92245aac81b8ed
# Parent  82703d3639a6dd4c31be22fe449029c5e7f6a2e3
gcc-4.6 compile fix: tools/xenstat/xentop/xentop.c

xentop.c: In function 'current_row':
xentop.c:275:9: error: variable 'x' set but not used 
[-Werror=unused-but-set-variable]
xentop.c: In function 'lines':
xentop.c:283:9: error: variable 'x' set but not used 
[-Werror=unused-but-set-variable]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 82703d3639a6 -r c6ae952c7f40 tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Thu May 19 18:59:48 2011 +0200
+++ b/tools/xenstat/xentop/xentop.c     Thu May 19 18:59:50 2011 +0200
@@ -272,17 +272,13 @@ static void fail(const char *str)
 /* Return the row containing the cursor. */
 static int current_row(void)
 {
-       int y, x;
-       getyx(stdscr, y, x);
-       return y;
+       return getcury(stdscr);
 }
 
 /* Return the number of lines on the screen. */
 static int lines(void)
 {
-       int y, x;
-       getmaxyx(stdscr, y, x);
-       return y;
+       return getmaxy(stdscr);
 }
 
 /* printf-style print function which calls printw, but only if the cursor is

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.