[Ocfs2-tools-devel] [PATCH] Cleanup unused variables in o2info

Goldwyn Rodrigues rgoldwyn at gmail.com
Fri Mar 9 13:23:45 PST 2012


    libo2info.c: In function ‘do_fiemap’:
    libo2info.c:408:25: warning: variable ‘blk_shift’ set but not used

Signed-off-by: Goldwyn Rodrigues <rgoldwyn at suse.de>
---
 o2info/libo2info.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/o2info/libo2info.c b/o2info/libo2info.c
index c98a58e..cff7c2d 100644
--- a/o2info/libo2info.c
+++ b/o2info/libo2info.c
@@ -405,7 +405,7 @@ static int do_fiemap(int fd, int flags, struct
o2info_fiemap *ofp)
 	char buf[4096];

 	int ret = 0, last = 0;
-	int cluster_shift = 0, blk_shift = 0;
+	int cluster_shift = 0;
 	int count = (sizeof(buf) - sizeof(struct fiemap)) /
 		     sizeof(struct fiemap_extent);

@@ -419,9 +419,6 @@ static int do_fiemap(int fd, int flags, struct
o2info_fiemap *ofp)
 	if (ofp->clustersize)
 		cluster_shift = ul_log2(ofp->clustersize);

-	if (ofp->blocksize)
-		blk_shift = ul_log2(ofp->blocksize);
-
 	memset(fiemap, 0, sizeof(*fiemap));

 	ret = figure_extents(fd, &num_extents, 0);
-- 
1.7.7



More information about the Ocfs2-tools-devel mailing list