From: Ricardo Martins <ricardo@scarybox.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/1] mmap: fix uninitialized entities warnings.
Date: Thu, 01 May 2008 19:54:48 +0000 [thread overview]
Message-ID: <20080501195448.GA954@macbookpro> (raw)
In-Reply-To: <1209668812-17641-1-git-send-email-ricardo@scarybox.net>
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
On Thu, 01 May 2008 13:16, Matthew Wilcox wrote:
> On Thu, May 01, 2008 at 08:06:52PM +0100, Ricardo Martins wrote:
> > This is my first patch for the Linux kernel. It fixes the following
> > warnings given by gcc 4.3.0 about uninitialzed entities in mmap.c:
>
> First, it's generally a bad idea to fix these warnings. They sometimes
> obscure real bugs.
I see.
> > I'd appreciate some feedback.
>
> > * x: (no) no x: (no) yes x: (no) yes x: (yes) yes
> > - *
> > + *
>
> Don't mix whitespace changes with other changes.
Ok, it won't happen again.
> > - struct vm_area_struct *vma, *prev;
> > + struct vm_area_struct *vma, *prev = NULL;
>
> gcc bug -- it's failing to notice that find_vma_prepare() will always
> initialise pprev.
>
> > - struct rb_node **rb_link, *rb_parent;
> > + struct rb_node **rb_link = NULL, *rb_parent = NULL;
>
> Likewise.
Hmm, that crossed my mind and I thought it was weird that gcc was
complaining about it.
> The other changes in your patch are either whitespace or fixes for the
> same gcc problem.
Thanks for your feedback; it was very helpful, since I'm a C newbie.
Regards,
--
Ricardo Martins * scarybox.net * GPG key: 0x1308F1B4
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-05-01 19:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 19:06 [PATCH 1/1] mmap: fix uninitialized entities warnings Ricardo Martins
2008-05-01 19:16 ` Matthew Wilcox
2008-05-01 19:43 ` Adrian Bunk
2008-05-01 19:54 ` Ricardo Martins [this message]
2008-05-01 20:25 ` Matthew Wilcox
2008-05-01 20:40 ` Adrian Bunk
2008-05-01 21:05 ` Matthew Wilcox
2008-05-01 21:13 ` Adrian Bunk
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=20080501195448.GA954@macbookpro \
--to=ricardo@scarybox.net \
--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.