Subject: Re: [PATCH 1/2] merge-recursive: Workaround unused variable warning

From: Jonathan Nieder <[email-masked]>
Date: Tue, 17 Aug 2010 19:10:32 -0500

Elijah Newren wrote:
> On Thu, Aug 12, 2010 at 8:09 PM, Elijah Newren <[email-masked]> wrote:

>> +++ b/merge-recursive.c
>> @@ -1214,6 +1214,7 @@ static int process_df_entry(struct merge_options *o,
>>        /* We currently only handle D->F cases */
>>        assert((!o_sha && a_sha && !b_sha) ||
>>               (!o_sha && !a_sha && b_sha));
>> +       (void)o_sha;
[...]
>                        would a different method of fixing warnings
> when NDEBUG is defined be preferred?  (Maybe changing the
> "assert(foo)" into "if (!foo) die..." instead?)

Yes, that sounds like a good idea.  The user would probably benefit
from knowing what happened.