invutil: fix a gcc warning
PATCH 1/1 invutil: fix a gcc warning
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 <[email protected]>
invutil/screen.c +1 -2
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Christoph Hellwig
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 <[email protected]>
Looks good.
Reviewed-by Alex Elder <[email protected]>
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs