All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] invutil: fix a gcc warning
@ 2011-09-22 16:48 Christoph Hellwig
  2011-09-22 19:18 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2011-09-22 16:48 UTC (permalink / raw)
  To: xfs

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@lst.de>

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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] invutil: fix a gcc warning
  2011-09-22 16:48 [PATCH] invutil: fix a gcc warning Christoph Hellwig
@ 2011-09-22 19:18 ` Alex Elder
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2011-09-22 19:18 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Thu, 2011-09-22 at 12:48 -0400, Christoph Hellwig wrote:
> 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@lst.de>

Looks good.

Reviewed-by: Alex Elder <aelder@sgi.com>


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-22 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 16:48 [PATCH] invutil: fix a gcc warning Christoph Hellwig
2011-09-22 19:18 ` Alex Elder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.