All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 7/7] Fix misleading gcc4 warning: (160) offset and block may be used uninitialized in this function
@ 2005-06-20 21:57 domen
  2005-06-21  7:17 ` Jörn Engel
  0 siblings, 1 reply; 2+ messages in thread
From: domen @ 2005-06-20 21:57 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, Jesse Millan, domen

[-- 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;

--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-21  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 21:57 [patch 7/7] Fix misleading gcc4 warning: (160) offset and block may be used uninitialized in this function domen
2005-06-21  7:17 ` Jörn Engel

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.