mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ameer Armaly <ameer@bellsouth.net>
To: linux-kernel@vger.kernel.org
Subject: [patch] fs warning fixes
Date: Sun, 21 May 2006 15:03:36 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0605211502450.2255@sg1> (raw)

This patch gets rid of two uninitialized variable warnings by initializing idx in fs/bio.c and fd in fs/eventpoll.c; both of these are initialized through pointers later on.

diff --git a/fs/bio.c b/fs/bio.c
index eb8fbc5..c4deed9 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m

  		bio_init(bio);
  		if (likely(nr_iovecs)) {
-			unsigned long idx;
+			unsigned long idx = 0;

  			bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
  			if (unlikely(!bvl)) {
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 1b4491c..243c254 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -497,7 +497,7 @@ void eventpoll_release_file(struct file
   */
  asmlinkage long sys_epoll_create(int size)
  {
-	int error, fd;
+	int error, fd = 0;
  	struct eventpoll *ep;
  	struct inode *inode;
  	struct file *file;

             reply	other threads:[~2006-05-21 19:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-21 19:03 Ameer Armaly [this message]
2006-05-21 22:07 ` Chris Wedgwood

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=Pine.LNX.4.61.0605211502450.2255@sg1 \
    --to=ameer@bellsouth.net \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®