2014-06-08 01:41:54

by Chris Metcalf

[permalink] [raw]
Subject: Re: [PATCH] arch: tile: kernel: unaligned.c: Cleaning up uninitialized variables

On 5/31/2014 7:00 PM, Rickard Strandqvist wrote:
> There is a risk that the variable will be used without being initialized.
>
> This was largely found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist<[email protected]>
> ---
> arch/tile/kernel/unaligned.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks! Taken into the tile tree with some slight modifications (initialize variables to -1 not 0, and remove the resulting dead code in find_regs).

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com


2014-06-08 17:18:00

by Rickard Strandqvist

[permalink] [raw]
Subject: Re: [PATCH] arch: tile: kernel: unaligned.c: Cleaning up uninitialized variables

Hi Chris

So uint max was a better default value.
Yeah, good it came into use. The main thing that the code got a proper review :)


Kind regards
Rickard Strandqvist


2014-06-08 3:41 GMT+02:00 Chris Metcalf <[email protected]>:
> On 5/31/2014 7:00 PM, Rickard Strandqvist wrote:
>>
>> There is a risk that the variable will be used without being initialized.
>>
>> This was largely found by using a static code analysis program called
>> cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist<[email protected]>
>> ---
>> arch/tile/kernel/unaligned.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Thanks! Taken into the tile tree with some slight modifications (initialize
> variables to -1 not 0, and remove the resulting dead code in find_regs).
>
> --
> Chris Metcalf, Tilera Corp.
> http://www.tilera.com
>