Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507934
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] block: zoned: fix harmless maybe-uninitialized warning |
| Date | 2016-10-25 05:00 +0200 |
| Message-ID | <sw081-82K-3@gated-at.bofh.it> (permalink) |
| References | <suKeZ-7AT-5@gated-at.bofh.it> <svYpz-6Zw-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/24/2016 07:00 PM, Martin K. Petersen wrote: >>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> writes: > > Arnd> The blkdev_report_zones produces a harmless warning when > Arnd> -Wmaybe-uninitialized is set, after gcc gets a little confused > Arnd> about the multiple 'goto' here: > > Arnd> block/blk-zoned.c: In function 'blkdev_report_zones': > Arnd> block/blk-zoned.c:188:13: error: 'nz' may be used uninitialized in > Arnd> this function [-Werror=maybe-uninitialized] > > Arnd> Moving the assignment to nr_zones makes this a little simpler > Arnd> while also avoiding the warning reliably. I'm removing the > Arnd> extraneous initialization of 'int ret' in the same patch, as that > Arnd> is semi-related and could cause an uninitialized use of that > Arnd> variable to not produce a warning. > > Jens: Are you picking up Arnd's two fixes for the zoned code? Yep, adding them now. Thanks Arnd. -- Jens Axboe
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] block: zoned: fix harmless maybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-10-21 17:50 +0200
Re: [PATCH] block: zoned: fix harmless maybe-uninitialized warning Shaun Tancheff <shaun.tancheff@seagate.com> - 2016-10-21 22:50 +0200
Re: [PATCH] block: zoned: fix harmless maybe-uninitialized warning "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-10-25 03:10 +0200
Re: [PATCH] block: zoned: fix harmless maybe-uninitialized warning Jens Axboe <axboe@kernel.dk> - 2016-10-25 05:00 +0200
csiph-web