Subject: Re: [PATCH/RFC] reflog: silence -O3 -Wuninitialized warning

From: Johannes Sixt <[email-masked]>
Date: Wed, 16 Mar 2011 10:09:58 +0100

Am 3/16/2011 6:22, schrieb Junio C Hamano:
> I am not suggesting to work this around on the caller side, but I wonder
> what effect the usual workaround to tell the compiler that we know it
> doesn't understand the validity of this variable by saying:
> 
> 	unsigned long expire = expire;
> 
> have on this?

Well, perhaps the compiler followed the C standard more closely than it is
good? By the law, the assignment above provokes undefined behavior, and
the compiler is allowed to do anything.

I think it's time that you accept patches that turn this into

	unsigned long expire = 0;

-- Hannes