From: Junio C Hamano Date: Mon, 23 Mar 2020 20:24:07 GMT Subject: Re: [PATCH v2 09/18] unpack-trees: add a new update_sparsity() function Message-ID: In-Reply-To: <5a83259e-af03-1930-a62b-75ad37b05f37@gmail.com> Derrick Stolee writes: >>>> +int update_sparsity(struct unpack_trees_options *options); >>>> + >>> >>> This appears to not use the enum as it should. >> >> Whoops! Will fix. (Interesting that the compiler didn't flag any >> kind of warning based on mismatch of declared function return types >> for update_sparsity() in the .c and .h files...) > > *shrug* enums are essentially decoration over an int, so I'm not > surprised it can happen. ;-) Yeah, the value of preferring enum over preprocessor macros because it helps debuggers to show symbolic constants, is oversold, I think. Types of variables and functions' return values need to be set to the enum or the benefit won't come to us X-<.