git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Elijah Newren <newren@gmail.com>
Date
Aug 18, 2010, 00:00 UTC
Message-ID
<AANLkTikLXy4gPttmX=wzcDaFAfZO=OEk4PEDKh3sCSOF@mail.gmail.com>
In-Reply-To
<1281665352-10533-2-git-send-email-newren@gmail.com>
Hi,
On Thu, Aug 12, 2010 at 8:09 PM, Elijah Newren <newren@gmail.com> wrote:
Show 11 quoted lines
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 9678c1d..7e32498 100644
> --- a/merge-recursive.c
> +++ 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;
>
>        entry->processed = 1;

It appears that this patch did not get included, though 2/2 from this series did. I'm not sure whether that was intentional or accidental. If it was intentional, would a different method of fixing warnings when NDEBUG is defined be preferred? (Maybe changing the "assert(foo)" into "if (!foo) die..." instead?)

If you'd rather just leave it as is, that's fine too. I just wanted to make sure it was addressed to Johannes' satisfaction, since he brought it up as an issue for the Windows build caused by my previous patches.

Thanks, Elijah

Previous: Elijah NewrenNext: Jonathan Nieder
Message 3 of 9 in “Fix windows portability issues in en/d-f-conflict-fix series”
  1. 0/2 Fix windows portability issues in en/d-f-conflict-fix seriesElijah Newren, Aug 13, 2010
  2. 1/2 merge-recursive: Workaround unused variable warningElijah Newren, Aug 13, 2010
  3. Elijah NewrenAug 18, 2010
  4. Jonathan NiederAug 18, 2010
  5. Junio C HamanoAug 18, 2010
  6. Elijah NewrenAug 18, 2010
  7. Junio C HamanoAug 18, 2010
  8. Elijah NewrenAug 18, 2010
  9. 2/2 Mark tests that use symlinks as needing SYMLINKS prerequisiteElijah Newren, Aug 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.