lkml.org 
[lkml]   [2016]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] block: zoned: fix harmless maybe-uninitialized warning
From
Date
>>>>> "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?

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2016-10-25 03:02    [W:0.077 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site