Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning
From: Andy Shevchenko
Date: Fri Jul 14 2017 - 15:49:51 EST
On Fri, Jul 14, 2017 at 10:37 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
>> On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>>> gcc points out a possible format string overflow for a large value of 'zone':
>> Here we need to convert
>> int i;
>> u8 i;
> That was my first impulse, but then I decided not to change the
> idiomatic 'int i' for the index variable to 'u8' as that would be
> less idiomatic.
>> I will take it after addressing above.
>> P.S. You may do this change across the file.
> How about changing it to 'u8 zone'?
I'm ultimately fine with that (just gentle reminder you might fix all
3 occurrences of it in that driver).
With Best Regards,