linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@dilger.ca>
Subject: [PATCH] debugfs: fix debugfs/quota.c compile warnings
Date: Thu, 22 May 2014 00:38:07 -0600	[thread overview]
Message-ID: <1400740687-25441-1-git-send-email-adilger@dilger.ca> (raw)

Fix type mismatch and unused variable warnings.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
---
 debugfs/quota.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/debugfs/quota.c b/debugfs/quota.c
index 95d064b..5589c1a 100644
--- a/debugfs/quota.c
+++ b/debugfs/quota.c
@@ -93,18 +93,19 @@ static int parse_quota_type(const char *cmdname, const char *str)
 static int list_quota_callback(struct dquot *dq, void *cb_data)
 {
 	printf("%8u   %8lld %8lld %8lld    %8lld %8lld %8lld\n",
-	       dq->dq_id, dq->dq_dqb.dqb_curspace,
-	       dq->dq_dqb.dqb_bsoftlimit, dq->dq_dqb.dqb_bhardlimit,
-	       dq->dq_dqb.dqb_curinodes,
-	       dq->dq_dqb.dqb_isoftlimit, dq->dq_dqb.dqb_ihardlimit);
+	       dq->dq_id, (long long)dq->dq_dqb.dqb_curspace,
+	       (long long)dq->dq_dqb.dqb_bsoftlimit,
+	       (long long)dq->dq_dqb.dqb_bhardlimit,
+	       (long long)dq->dq_dqb.dqb_curinodes,
+	       (long long)dq->dq_dqb.dqb_isoftlimit,
+	       (long long)dq->dq_dqb.dqb_ihardlimit);
 	return 0;
 }
 
 void do_list_quota(int argc, char *argv[])
 {
 	errcode_t	retval;
-	int		i, type;
-	int		flags = 0;
+	int		type;
 	struct quota_handle *qh;
 
 	if (load_quota_ctx(argv[0]))
@@ -132,9 +133,7 @@ void do_list_quota(int argc, char *argv[])
 
 void do_get_quota(int argc, char *argv[])
 {
-	errcode_t	retval;
-	int		i, err, type;
-	int		flags = 0;
+	int		err, type;
 	struct quota_handle *qh;
 	struct dquot	*dq;
 	qid_t		id;
@@ -165,7 +164,7 @@ void do_get_quota(int argc, char *argv[])
 	if (dq) {
 		list_quota_callback(dq, NULL);
 		ext2fs_free_mem(&dq);
-	} else
+	} else {
 		com_err(argv[0], 0, "couldn't read quota record");

             reply	other threads:[~2014-05-22  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  6:38 Andreas Dilger [this message]
2014-05-22 21:57 ` [PATCH] debugfs: fix debugfs/quota.c compile warnings Theodore Ts'o

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=1400740687-25441-1-git-send-email-adilger@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).