linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] Fix gcc4 warning, file & fd may be used uninitialized in this function
@ 2005-05-28 23:17 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-05-28 23:17 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, Jesse Millan, domen

[-- Attachment #1: warning-fs_eventpoll.c --]
[-- Type: text/plain, Size: 718 bytes --]

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



This patch eliminates the warning that is generated when passing a
reference of an uninitialized variable to a function where it possible
that the function will return without initializing that variable.

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

---
 eventpoll.c |    3 +++
 1 files changed, 3 insertions(+)

Index: quilt/fs/eventpoll.c
===================================================================
--- quilt.orig/fs/eventpoll.c
+++ quilt/fs/eventpoll.c
@@ -748,6 +748,9 @@ eexit_3:
 eexit_2:
 	put_filp(file);
 eexit_1:
+	/* Reference went uninitialized. */
+	*efd = 0;
+	*efile = NULL;
 	return error;
 }
 

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-28 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-28 23:17 [patch 1/2] Fix gcc4 warning, file & fd may be used uninitialized in this function domen

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).