From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5646 invoked by alias); 19 Aug 2009 13:33:41 -0000 Received: (qmail 5639 invoked by alias); 19 Aug 2009 13:33:41 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: gfs2-utils: master - libgfs2: Fix "Value stored is never read" warnings To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: gfs2-utils.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 075fdcfb97f143f19991820cbc180d1952b043a4 X-Git-Newrev: 16e8ab95f9db8dd2ab3c9e0b5c5b062c62c2dcd8 From: andyp Message-Id: <20090819133313.89630120215@lists.fedorahosted.org> Date: Wed, 19 Aug 2009 13:33:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00216.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=16e8ab95f9db8dd2ab3c9e0b5c5b062c62c2dcd8 Commit: 16e8ab95f9db8dd2ab3c9e0b5c5b062c62c2dcd8 Parent: 075fdcfb97f143f19991820cbc180d1952b043a4 Author: Andrew Price AuthorDate: Wed Aug 19 09:24:33 2009 +0100 Committer: Andrew Price CommitterDate: Wed Aug 19 14:28:21 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 Acked-by: Bob Peterson --- 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 e02cc22..1f7b293 100644 --- a/gfs2/libgfs2/fs_geometry.c +++ b/gfs2/libgfs2/fs_geometry.c @@ -79,7 +79,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 b87e895..5cca91d 100644 --- a/gfs2/libgfs2/gfs1.c +++ b/gfs2/libgfs2/gfs1.c @@ -303,9 +303,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 87e1e30..a315ebc 100644 --- a/gfs2/libgfs2/misc.c +++ b/gfs2/libgfs2/misc.c @@ -123,9 +123,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)