bug-hurd
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]