Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   libgfs2: Clean up some warnings (http://www.linux-archive.org/cluster-development/661482-libgfs2-clean-up-some-warnings.html)

Andrew Price 04-30-2012 05:29 PM

libgfs2: Clean up some warnings
 
Fixes these warnings:
fs_geometry.c:80:47: warning: variable 'rlast2' set but not used
[-Wunused-but-set-variable]
meta.c:732:3: warning: large integer implicitly truncated to unsigned
type [-Woverflow]

Signed-off-by: Andrew Price <anprice@redhat.com>
---
gfs2/libgfs2/fs_geometry.c | 3 +--
gfs2/libgfs2/meta.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index fb55697..e248f7c 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -77,7 +77,7 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
int rgsize_specified)
{
struct device *dev;
- struct rgrp_tree *rl, *rlast = NULL, *rlast2 = NULL;
+ struct rgrp_tree *rl, *rlast = NULL;
struct osi_node *n, *next = NULL;
unsigned int rgrp = 0, nrgrp, rglength;
uint64_t rgaddr;
@@ -105,7 +105,6 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
PRIx64 "), length = %"PRIu64" (0x%"
PRIx64 ")
", rgrp + 1, rl->start, rl->start,
rl->length, rl->length);
- rlast2 = rlast;
rlast = rl;
}
rlast->start = rlast->ri.ri_addr;
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 87f8f31..1f796c8 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -729,7 +729,7 @@ const struct lgfs2_metadata lgfs2_metadata[] = {
},
[LGFS2_MT_FREE] = {
.gfs1 = 1,
- .gfs2 = 2,
+ .gfs2 = 1,
.name = "free",
},
};
--
1.7.7.6

Steven Whitehouse 05-01-2012 09:23 AM

libgfs2: Clean up some warnings
 
Hi,

Looks good,

Steve.

On Mon, 2012-04-30 at 18:29 +0100, Andrew Price wrote:
> Fixes these warnings:
> fs_geometry.c:80:47: warning: variable 'rlast2' set but not used
> [-Wunused-but-set-variable]
> meta.c:732:3: warning: large integer implicitly truncated to unsigned
> type [-Woverflow]
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
> ---
> gfs2/libgfs2/fs_geometry.c | 3 +--
> gfs2/libgfs2/meta.c | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
> index fb55697..e248f7c 100644
> --- a/gfs2/libgfs2/fs_geometry.c
> +++ b/gfs2/libgfs2/fs_geometry.c
> @@ -77,7 +77,7 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
> int rgsize_specified)
> {
> struct device *dev;
> - struct rgrp_tree *rl, *rlast = NULL, *rlast2 = NULL;
> + struct rgrp_tree *rl, *rlast = NULL;
> struct osi_node *n, *next = NULL;
> unsigned int rgrp = 0, nrgrp, rglength;
> uint64_t rgaddr;
> @@ -105,7 +105,6 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
> PRIx64 "), length = %"PRIu64" (0x%"
> PRIx64 ")
", rgrp + 1, rl->start, rl->start,
> rl->length, rl->length);
> - rlast2 = rlast;
> rlast = rl;
> }
> rlast->start = rlast->ri.ri_addr;
> diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
> index 87f8f31..1f796c8 100644
> --- a/gfs2/libgfs2/meta.c
> +++ b/gfs2/libgfs2/meta.c
> @@ -729,7 +729,7 @@ const struct lgfs2_metadata lgfs2_metadata[] = {
> },
> [LGFS2_MT_FREE] = {
> .gfs1 = 1,
> - .gfs2 = 2,
> + .gfs2 = 1,
> .name = "free",
> },
> };


All times are GMT. The time now is 03:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.