[PATCH] invutil: fix a gcc warning

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

 



We never use the lines variable in put_line, except by writing to.  Replace
the fairly ugly getmaxyx macro causing this with the getmaxx call (which
is used by getmaxyx underneath) to only get the number of columns.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: xfsdump/invutil/screen.c
===================================================================
--- xfsdump.orig/invutil/screen.c	2011-09-22 12:36:55.445019732 -0400
+++ xfsdump/invutil/screen.c	2011-09-22 12:38:39.272020235 -0400
@@ -27,11 +27,10 @@ put_line(WINDOW *win, int line, char *ms
 {
     int c;
     int cols;
-    int lines;
     int msglen;
     static char text[256];
 
-    getmaxyx(win, lines, cols);
+    cols = getmaxx(win);
     cols--;
     if(cols > 255) {
 	cols = 255;

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux