diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-09-22 16:48:10 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-09-23 12:03:24 -0500 |
commit | cf0cf7628a990e088ccec9472fba47b67988768e (patch) | |
tree | 7a3bcb7a0d804f0a29320680bb0f1aa4e19465cc | |
parent | b7eb565c802796b8d492f4732311172cd26a6ab4 (diff) | |
download | xfsdump-dev-cf0cf7628a990e088ccec9472fba47b67988768e.tar.gz |
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 <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
-rw-r--r-- | invutil/screen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/invutil/screen.c b/invutil/screen.c index 9f1420b6..12074f01 100644 --- a/invutil/screen.c +++ b/invutil/screen.c @@ -27,11 +27,10 @@ put_line(WINDOW *win, int line, char *msg, int attr, alignment_t alignment) { 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; |