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 <[email protected]>
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: [PATCH] bio: gcc warning fix.
- From: Al Viro <[email protected]>
- Re: [PATCH] bio: gcc warning fix.
- References:
- RE: [PATCH] bio: gcc warning fix.
- From: "Khushil Dep" <[email protected]>
- Re: [PATCH] bio: gcc warning fix.
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] bio: gcc warning fix.
- From: Jens Axboe <[email protected]>
- 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):