[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] kern/slab.c: initialize optimal_embed
From: |
Richard Braun |
Subject: |
Re: [PATCH 1/5] kern/slab.c: initialize optimal_embed |
Date: |
Tue, 19 Nov 2013 22:48:29 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Nov 19, 2013 at 09:06:05PM +0100, Marin Ramesa wrote:
> On 19.11.2013 20:42:24, Samuel Thibault wrote:
> > Marin Ramesa, le Tue 19 Nov 2013 07:34:19 +0100, a écrit :
> > > optimal_embed is initialized to a random value. Quiet the warning
> > > by initializing to zero.
> >
> > Analyzers will probably prefer that indeed.
>
> So there is a good reason for this kind of initialization (int x = x)?
It was done on purpose, yes. It tells GCC to consider the variable
initialized, and is useful to silence warnings when the code is valid.
--
Richard Braun
- More patches based on clang reports, Marin Ramesa, 2013/11/19
- [PATCH 2/5] kern/slab.c: initialize info_size, Marin Ramesa, 2013/11/19
- [PATCH 3/5] kern/processor.c: check if threads is NULL, Marin Ramesa, 2013/11/19
- [PATCH 5/5] vm/vm_fault.c: check if active_threads is NULL, Marin Ramesa, 2013/11/19
- [PATCH 4/5] vm/vm_fault.c: check if active_threads is NULL, Marin Ramesa, 2013/11/19