From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH] invutil: fix a gcc warning
Date: Thu, 22 Sep 2011 12:48:10 -0400 [thread overview]
Message-ID: <20110922164810.GA12353@infradead.org> (raw)
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
next reply other threads:[~2011-09-22 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 16:48 Christoph Hellwig [this message]
2011-09-22 19:18 ` [PATCH] invutil: fix a gcc warning Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110922164810.GA12353@infradead.org \
--to=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.