public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: andyp <andyp@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - libgfs2: Fix "Value stored is never read" warnings
Date: Wed, 19 Aug 2009 14:36:00 -0000	[thread overview]
Message-ID: <20090819143557.AF3B5120215@lists.fedorahosted.org> (raw)

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)


                 reply	other threads:[~2009-08-19 14:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090819143557.AF3B5120215@lists.fedorahosted.org \
    --to=andyp@fedoraproject.org \
    --cc=cluster-cvs-relay@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 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).