Re: [PATCH 14/15] xfsprogs: eliminate shadow variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/6/18 5:16 AM, Christoph Hellwig wrote:
> On Thu, Oct 04, 2018 at 11:03:15PM -0500, Eric Sandeen wrote:
>> From: Eric Sandeen <sandeen@xxxxxxxxxx>
>>
>> None of these seem activel harmful, but to avoid confusion, remove all
>> shadow variables by just renaming them in their local scope.
>>
>> Fixes sparse warnings about this.
> 
> I'd feel much more comforable reviewing this with one patch per
> function that explains why the transformation is safe, especially
> as the patch itself contradicts the explanation above - some variables
> are removed instead of renamed for example.
> 

Well, existing variables are used in their place, i.e. another existing
loop counter "i" is re-used instead of one which shadows a global variable
("x").

But ok, I can split it up more.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux