On Fri, 2006-01-06 at 19:48 +0100, Jens Axboe wrote: > On Fri, Jan 06 2006, Jesper Juhl wrote: > > gcc is right to warn in the sense that it doesn't know if > > bvec_alloc_bs() will read or write into idx when its address is passed > > The function is right there, on top of bio_alloc_bioset(). It's even > inlined. gcc has absolutely no reason to complain. GCC complains because it is possible for that function to return without ever setting a value into idx. It's the "default" case in the switch. Of course, if that happens, idx will not be used and so it is not actually a problem. -- Zan Lynx <zlynx@acm.org>
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: [PATCH] bio: gcc warning fix.
- From: Al Viro <viro@ftp.linux.org.uk>
- Re: [PATCH] bio: gcc warning fix.
- References:
- RE: [PATCH] bio: gcc warning fix.
- From: "Khushil Dep" <khushil.dep@help.basilica.co.uk>
- Re: [PATCH] bio: gcc warning fix.
- From: Jesper Juhl <jesper.juhl@gmail.com>
- Re: [PATCH] bio: gcc warning fix.
- From: Jens Axboe <axboe@suse.de>
- RE: [PATCH] bio: gcc warning fix.
- Prev by Date: Re: command line parsing broken in 2.6.15-git?
- Next by Date: Re: [patch 7/7] Make "inline" no longer mandatory for gcc 4.x
- Previous by thread: Re: [PATCH] bio: gcc warning fix.
- Next by thread: Re: [PATCH] bio: gcc warning fix.
- Index(es):
![]() |