Skip to contentSkip to conversation

invutil: fix a gcc warning

PATCH In review Christoph Hellwig 2 participants 2 messages Sep 22, 2011

lore
Share & tools
lore
#0 lore raw

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.

invutil/screen.c +1 -2
Index: xfsdump/invutil/screen.c
===================================================================
@@ -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

Reviewed-by on v1 1/1
#1 lore raw
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.

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs