All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Millan <jessem@cs.pdx.edu>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] Fix misleading gcc4 warning: (160) offset and block
Date: Thu, 16 Jun 2005 22:16:08 +0000	[thread overview]
Message-ID: <42B1FA28.4070500@cs.pdx.edu> (raw)
In-Reply-To: <42966B18.6020802@cs.pdx.edu>

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]


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.




[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 499 bytes --]

Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>

--- linux-2.6.12-rc6.kj/fs/isofs/namei.c~	2005-06-16 14:34:01.367647520 -0700
+++ linux-2.6.12-rc6.kj/fs/isofs/namei.c	2005-06-16 14:48:06.518165112 -0700
@@ -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;

[-- Attachment #3: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

      parent reply	other threads:[~2005-06-16 22:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27  0:34 [KJ] [PATCH] Fix misleading gcc4 warning, Jesse Millan
2005-05-27  3:52 ` [KJ] [PATCH] Fix misleading gcc4 warning, addr may be used randy_dunlap
2005-05-30  0:03 ` [KJ] [PATCH] Fix misleading gcc4 warning, Adrian Bunk
2005-05-30  0:14 ` Jesse Millan
2005-05-30  1:59 ` Adrian Bunk
2005-05-30  4:56 ` Jesse Millan
2005-05-30  8:24 ` Arnd Bergmann
2005-06-01 21:35 ` Jesse Millan
2005-06-03 18:52 ` Jesse Millan
2005-06-16 22:16 ` Jesse Millan [this message]

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=42B1FA28.4070500@cs.pdx.edu \
    --to=jessem@cs.pdx.edu \
    --cc=kernel-janitors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.