On Tue, Mar 20, 2018 at 10:52:16PM +, Ramsay Jones wrote:
> > Maybe too clever, but I think you could just do:
> >
> > unsigned int saved_namelen = 0;
> > ...
> > saved_namelen = ce_namelen(ce);
> > ...
> > if (saved_namelen)
> > ce->ce_namelen = saved_namelen;
> > ce->ce_fl
On 20/03/18 04:36, Jeff King wrote:
> On Mon, Mar 19, 2018 at 05:56:11PM +, Ramsay Jones wrote:
>
[snip]
>> diff --git a/read-cache.c b/read-cache.c
>> index 2eb81a66b..49607ddcd 100644
>> --- a/read-cache.c
>> +++ b/read-cache.c
>> @@ -2104,13 +2104,15 @@ static int ce_write_entry(git_SHA_C
On Mon, Mar 19, 2018 at 05:56:11PM +, Ramsay Jones wrote:
> For the purposes of this discussion, the ce_write_entry() function has
> three code blocks of interest, that look like so:
>
> /* block #1 */
> if (ce->ce_flags & CE_STRIP_NAME) {
> saved_namelen = ce_
The function ce_write_entry() uses a 'self-initialised' variable
construct, for the symbol 'saved_namelen', to suppress a gcc
'-Wmaybe-uninitialized' warning, given that the warning is a false
positive.
For the purposes of this discussion, the ce_write_entry() function has
three code blocks of in
4 matches
Mail list logo