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

Re: [PATCH] sequencer: cleanup for gcc 8.2.1 warning

From
Carlo Arenas <carenas@gmail.com>
Date
Oct 25, 2018, 09:15 UTC
Message-ID
<CAPUEsphFSs3gmo2N6Oi7rhhsgU2BC3ijZH4yxbcF1R8SKQLjhg@mail.gmail.com>
In-Reply-To
<xmqqwoq6ih34.fsf@gitster-ct.c.googlers.com>
On Thu, Oct 25, 2018 at 1:08 AM Junio C Hamano <gitster@pobox.com> wrote:
> For a single-use, not using the macro and just using "%s", "" should
> suffice.

OK, will send it as v2 then but would think it will be better if applied as a "fixup" on top of the original branch: 34b47315d9 ("rebase -i: move rebase--helper modes to rebase--interactive", 2018-09-27)

would be a good idea to include also enabling this warning in developer mode so it doesn't sneak back?, presume as the last patch of the refactor below?, FWIW this is the only case in current pu, and I suspect the sooner we add it to next the less likely we will find more.

Show 7 quoted lines
> If we want to hide the "%s", "" trickery from distracting
> the readers (which is what you are trying to address with your
> touch_file() proposal, I think, and I also suspect that it may be a
> legitimate one), I tend to think that it may be a better solution to
> introduce the EMPTY_PRINTF_ARG macro and use it everywhere, in
> builtin/commit.c, builtin/difftool.c and wt-status.c and not not
> just here.

will work on this in a different feature branch, but I had to admit I don't like it for status_printf case where it was IMHO a hack to get the new lines to begin with.

I would think it would make more sense to call a function that says "write_ttycolor_ln" instead for those cases.

Carlo
Previous: Junio C HamanoNext: Carlo Marcelo Arenas Belón
Message 6 of 7 in “sequencer: cleanup for gcc 8.2.1 warning”
  1. sequencer: cleanup for gcc 8.2.1 warningCarlo Marcelo Arenas Belón, Oct 25, 2018
  2. Junio C HamanoOct 25, 2018
  3. Junio C HamanoOct 25, 2018
  4. Carlo ArenasOct 25, 2018
  5. Junio C HamanoOct 25, 2018
  6. Carlo ArenasOct 25, 2018
  7. sequencer: cleanup for gcc warning in non developer modeCarlo Marcelo Arenas Belón, Oct 25, 2018

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.