All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - cleanup: gcc warning
Date: Fri, 15 Aug 2014 13:44:07 +0000 (UTC)	[thread overview]
Message-ID: <20140815134407.4EB0160EB1@fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8af23092310aeb02282f5082fba447586a1da0d3
Commit:        8af23092310aeb02282f5082fba447586a1da0d3
Parent:        8e449ebd63228bb8728d7e62989dc1254138b153
Author:        Peter Rajnoha <prajnoha@redhat.com>
AuthorDate:    Fri Aug 15 15:43:42 2014 +0200
Committer:     Peter Rajnoha <prajnoha@redhat.com>
CommitterDate: Fri Aug 15 15:43:42 2014 +0200

cleanup: gcc warning

One more:

metadata/thin_manip.c:503: warning: declaration of "snapshot_count" shadows a global declaration
---
 lib/metadata/thin_manip.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c
index b4da500..ae42da1 100644
--- a/lib/metadata/thin_manip.c
+++ b/lib/metadata/thin_manip.c
@@ -500,13 +500,13 @@ const char *get_pool_discards_name(thin_discards_t discards)
 	return "unknown";
 }
 
-int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snapshot_count)
+int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snap_count)
 {
 	struct seg_list *segl;
 	int r = 0;
 
-	if (snapshot_count)
-		*snapshot_count = 0;
+	if (snap_count)
+		*snap_count = 0;
 
 	if (!lv_is_thin_volume(lv) ||
 	    dm_list_empty(&lv->segs_using_this_lv))
@@ -515,8 +515,8 @@ int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snapshot_co
 	dm_list_iterate_items(segl, &lv->segs_using_this_lv) {
 		if (segl->seg->origin == lv) {
 			r = 1;
-			if (snapshot_count)
-				(*snapshot_count)++;
+			if (snap_count)
+				(*snap_count)++;
 			else
 				/* not interested in number of snapshots */
 				break;



             reply	other threads:[~2014-08-15 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 13:44 Peter Rajnoha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-15 13:33 master - cleanup: gcc warning Peter Rajnoha

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=20140815134407.4EB0160EB1@fedorahosted.org \
    --to=prajnoha@fedoraproject.org \
    --cc=lvm-devel@redhat.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.