lkml.org 
[lkml]   [2006]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bio: gcc warning fix.
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.

> to it. But since we know that bvec_alloc_bs() only reads from it after

bio_alloc_bioset() you mean.

> having assigned a value we know that gcc's warning is wrong, idx can
> never *actually* be used uninitialized.

Indeed, that's the whole point. For the original submitter, you are not
the first to submit this. See archives for basically the same thread as
this one...

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-06 19:49    [W:0.076 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site