Re: What's cooking in git.git (Dec 2012, #05; Tue, 18)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 20, 2012, 18:13 UTC
- Message-ID
- <7vwqwc617y.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20121220145941.GC27211@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> On Tue, Dec 18, 2012 at 12:31:43PM -0800, Junio C Hamano wrote: > >> * jk/error-const-return (2012-12-15) 2 commits >> - silence some -Wuninitialized false positives >> - make error()'s constant return value more visible >> >> Help compilers' flow analysis by making it more explicit that >> error() always returns -1, to reduce false "variable used >> uninitialized" warnings. >> >> This is still an RFC. > > What's your opinion on this?
Ugly but not too much so, and it would be useful.
The only thing that makes it ugly is that it promises error() will return -1 and nothing else forever, but at this point in the evolution of the codebase, I think we are pretty much committed to it anyway, so I do not think it is a problem.