fs/bio.c: initialize variable, remove warning
PATCH 1/1 fs/bio.c: initialize variable, remove warning
From: Petri T. Koistinen <[email protected]>
Remove compiler warning by initializing uninitialized variable.
--- fs/bio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
---
fs/bio.c +1 -1
@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mbio_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)) {
fs/bio.c struct bio *bio_alloc_bioset(gfp_t gfp_m · line 169
Quoted 10 lines · Petri T. Koistinen
Remove compiler warning by initializing uninitialized variable.
fs/bio.c +1
-1@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mbio_init (bio);if (likely (nr_iovecs)) { -unsigned long idx; +unsigned long idx =0 ;
oh no not again!
Quoted 4 lines · Alexey Dobriyan
Quoted 1 line · Petri T. Koistinen
Remove compiler warning by initializing uninitialized variable.
oh no not again!
What about:
Quoted 1 line
Quoted 1 line
- unsigned long idx;
+ unsigned long idx; /* please don't patch bogus
warning */
:)
-Bob
Quoted 11 lines · Bob Copeland
Quoted 4 lines · Alexey Dobriyan
Quoted 1 line · Petri T. Koistinen
Remove compiler warning by initializing uninitialized variable.
oh no not again!
What about:
Quoted 1 line
Quoted 1 line
- unsigned long idx;
+ unsigned long idx; /* please don't patch bogus
warning */
I'll take that patch if you send it :-)
Signature · 1 line
Jens Axboe
Quoted 3 lines · Petri T. Koistinen
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.