From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: Konstantin Oshovskij <limulus@balticum-tv.lt>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: kernel 2.6.22.9-cfs-v22 compile warnings
Date: Mon, 8 Oct 2007 20:11:36 +0200 [thread overview]
Message-ID: <20071008181135.GA27024@Ahmed> (raw)
In-Reply-To: <470A23D0.8080503@balticum-tv.lt>
Hi Konstantin,
On Mon, Oct 08, 2007 at 03:34:24PM +0300, Konstantin Oshovskij wrote:
>
> Hello,
> i have encountered 2.6.22.9 compile warnings. This is the first time i
> decided to report them. I had various compile warnings with earlier
> kernel versions, its just i didnt had courage to report them :) I'm
> using instructions from REPORTING-BUGS file as template so please bear
> with me :)
>
The "may be used uninitialized" errors are false positives from GCC. Mostly
this happens from code paths like:
int x, y;
set_method(&x);
y = x;
> fs/xfs/xfs_bmap.c: In function 'xfs_bmap_rtalloc':
> fs/xfs/xfs_bmap.c:2650: warning: 'rtx' is used uninitialized in this
> function
>
Hidden by uninitialized_var() macro in latest pull. This macro silence
the gcc by using the trick: #define uninitialized_var(x) x = x
> function
> ipc/msg.c:390: warning: 'setbuf.mode' may be used uninitialized in
> this function
> CC ipc/sem.o
> ipc/sem.c: In function 'sys_semctl':
> ipc/sem.c:861: warning: 'setbuf.uid' may be used uninitialized in this
> function
> ipc/sem.c:861: warning: 'setbuf.gid' may be used uninitialized in this
> function
> ipc/sem.c:861: warning: 'setbuf.mode' may be used uninitialized in
> this function
>
Already hidden now by the uninitialized_var() macro.
> drivers/pci/search.c: In function 'pci_find_slot':
> drivers/pci/search.c:99: warning: 'pci_find_device' is deprecated
> (declared at include/linux/pci.h:477)
pci_find_slot is using pci_find_device on purpose here (equivalent to the
safe pci_get_slot method).
> drivers/pci/search.c: At top level:
> drivers/pci/search.c:434: warning: 'pci_find_device' is deprecated
> (declared at drivers/pci/search.c:241)
> drivers/pci/search.c:434: warning: 'pci_find_device' is deprecated
> (declared at drivers/pci/search.c:241)
>
False positives from function definition and from the innocent EXPORT_SYMBOL
macro (It makes the method available to kernel modules).
Regards,
--
Ahmed S. Darwish
HomePage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com
prev parent reply other threads:[~2007-10-08 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 12:34 PROBLEM: kernel 2.6.22.9-cfs-v22 compile warnings Konstantin Oshovskij
2007-10-08 18:11 ` Ahmed S. Darwish [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=20071008181135.GA27024@Ahmed \
--to=darwish.07@gmail.com \
--cc=limulus@balticum-tv.lt \
--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 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.