From: Petri T. Koistinen <[email protected]>
Remove compiler warning by initializing uninitialized variable.
Signed-off-by: Petri T. Koistinen <[email protected]>
---
fs/bio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/fs/bio.c b/fs/bio.c
index eb8fbc5..c4deed9 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
bio_init(bio);
if (likely(nr_iovecs)) {
- unsigned long idx;
+ unsigned long idx = 0;
bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
if (unlikely(!bvl)) {
On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> Remove compiler warning by initializing uninitialized variable.
> --- a/fs/bio.c
> +++ b/fs/bio.c
> @@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
>
> bio_init(bio);
> if (likely(nr_iovecs)) {
> - unsigned long idx;
> + unsigned long idx = 0;
oh no not again!
On 5/1/06, Alexey Dobriyan <[email protected]> wrote:
> On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> > Remove compiler warning by initializing uninitialized variable.
>
> oh no not again!
What about:
> > - unsigned long idx;
+ unsigned long idx; /* please don't patch bogus
warning */
:)
-Bob
On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> From: Petri T. Koistinen <[email protected]>
>
> Remove compiler warning by initializing uninitialized variable.
NAK. Unless you can show the path where it is used uninitialized,
such patches should not go in.
On Mon, May 01 2006, Bob Copeland wrote:
> On 5/1/06, Alexey Dobriyan <[email protected]> wrote:
> >On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> >> Remove compiler warning by initializing uninitialized variable.
> >
> >oh no not again!
>
> What about:
>
> >> - unsigned long idx;
> + unsigned long idx; /* please don't patch bogus
> warning */
I'll take that patch if you send it :-)
--
Jens Axboe