linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: domen@coderock.org
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-fsdevel@vger.kernel.org, Jesse Millan <jessem@cs.pdx.edu>,
	domen@coderock.org
Subject: [patch 7/7] Fix misleading gcc4 warning: (160) offset and block may be used uninitialized in this function
Date: Mon, 20 Jun 2005 23:57:06 +0200	[thread overview]
Message-ID: <20050620215705.668687000@nd47.coderock.org> (raw)

[-- Attachment #1: gcc4-fs_isofs_namei.c --]
[-- Type: text/plain, Size: 1055 bytes --]

From: Jesse Millan <jessem@cs.pdx.edu>



This warning appears to be a false alarm.

This patch eliminates the warning that 'offset' and 'block' may be used
uninitialized. The compiler does not like the conditional initialization
of the two variables in the function isofs_find_entry().

In isofs_find_entry(), 'offset' and 'block' are referred to as
'block_rv' and 'offset_rv' respectively and are now initialized
unconditionally to zero.


Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
Signed-off-by: Domen Puncer <domen@coderock.org>

---
 namei.c |    2 ++
 1 files changed, 2 insertions(+)

Index: quilt/fs/isofs/namei.c
===================================================================
--- quilt.orig/fs/isofs/namei.c
+++ quilt/fs/isofs/namei.c
@@ -57,6 +57,8 @@ isofs_find_entry(struct inode *dir, stru
 	unsigned long block, f_pos, offset, block_saved, offset_saved;
 	struct buffer_head * bh = NULL;
 	struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb);
+	*block_rv = 0;
+	*offset_rv = 0;
 
 	if (!ISOFS_I(dir)->i_first_extent)
 		return 0;

--

             reply	other threads:[~2005-06-20 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20 21:57 domen [this message]
2005-06-21  7:17 ` [patch 7/7] Fix misleading gcc4 warning: (160) offset and block may be used uninitialized in this function Jörn Engel

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=20050620215705.668687000@nd47.coderock.org \
    --to=domen@coderock.org \
    --cc=jessem@cs.pdx.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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 NNTP newsgroup(s).