public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - libgfs2: Fix "Value stored is never read" warnings
@ 2009-08-19 14:36 andyp
0 siblings, 0 replies; only message in thread
From: andyp @ 2009-08-19 14:36 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=43869f6ad3cb6a401a52b8455b00bfa86d3af422
Commit: 43869f6ad3cb6a401a52b8455b00bfa86d3af422
Parent: 495676a83779b50c0d7253c609958636ef1d46a2
Author: Andrew Price <andy@andrewprice.me.uk>
AuthorDate: Wed Aug 19 09:24:33 2009 +0100
Committer: Andrew Price <andy@andrewprice.me.uk>
CommitterDate: Wed Aug 19 15:30:27 2009 +0100
libgfs2: Fix "Value stored is never read" warnings
Building with CC="clang --analyze" gave the following warnings:
- misc.c:126:8: warning: Although the value stored to 'ret' is used in
the enclosing expression, the value is never actually read from 'ret'
- fs_geometry.c:82:3: warning: Value stored to 'rgsize_specified' is
never read
- gfs1.c:308:3: warning: Value stored to 'f' is never read
This patch makes them go away.
Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
Acked-by: Bob Peterson <rpeterso@redhat.com>
---
gfs2/libgfs2/fs_geometry.c | 1 -
gfs2/libgfs2/gfs1.c | 3 ---
gfs2/libgfs2/misc.c | 6 +++---
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index 394daed..9c5daf1 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -77,7 +77,6 @@ void compute_rgrp_layout(struct gfs2_sbd *sdp, int rgsize_specified)
uint64_t old_length, new_chunk;
log_info("Existing resource groups:\n");
- rgsize_specified = TRUE; /* consistently use existing size */
for (rgrp = 0, tmp = head->next; tmp != head;
tmp = tmp->next, rgrp++) {
rl = osi_list_entry(tmp, struct rgrp_list, list);
diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c
index 3375a6c..6fdabd9 100644
--- a/gfs2/libgfs2/gfs1.c
+++ b/gfs2/libgfs2/gfs1.c
@@ -301,9 +301,6 @@ int gfs1_ri_update(struct gfs2_sbd *sdp, int fd, int *rgcount)
if (gfs1_rindex_read(sdp, fd, &count1))
goto fail;
for (tmp = sdp->rglist.next; tmp != &sdp->rglist; tmp = tmp->next) {
- enum update_flags f;
-
- f = not_updated;
rgd = osi_list_entry(tmp, struct rgrp_list, list);
errblock = gfs2_rgrp_read(sdp, rgd);
if (errblock)
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
index 0d831d3..91bcc51 100644
--- a/gfs2/libgfs2/misc.c
+++ b/gfs2/libgfs2/misc.c
@@ -121,9 +121,9 @@ int check_for_gfs2(struct gfs2_sbd *sdp)
if (strstr(buffer, "0") == 0)
continue;
- if ((ret = sscanf(buffer, "%s %s %s %s %d %d",
- sdp->device_name, fspath,
- fstype, fsoptions, &fsdump, &fspass)) != 6)
+ ret = sscanf(buffer, "%s %s %s %s %d %d", sdp->device_name,
+ fspath, fstype, fsoptions, &fsdump, &fspass);
+ if (6 != ret)
continue;
if (strcmp(fstype, "gfs2") != 0)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-19 14:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19 14:36 cluster: STABLE3 - libgfs2: Fix "Value stored is never read" warnings andyp
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 read-only IMAP folder(s) and NNTP newsgroup(s).