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

Re: [PATCH] merge-file: fix build warning with gcc 4.8.5

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2022, 15:48 UTC
Message-ID
<xmqqbkt7api9.fsf@gitster.g>
In-Reply-To
<365e01e93dce582e9d926e83bdc6891310d22699.1659084832.git.congdanhqx@gmail.com>
Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:
Show 8 quoted lines
> mmfs is an array of struct, xmparamt_t's first field is a struct,
> mmfs's element and xmparamt_t's first field must be initialised
> with {0}.
>
> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
> ---
>
>  This warning is available in master

Thanks, but didn't we discuss this recently and decided that such (false) complaints by ancient compiler is not worth catering to by deliberately deviating the "zero initializing a struct is always done via { 0 }" idiom?

cf. https://lore.kernel.org/git/CAPig+cSgNB=SzAZLhXvteSYmy0HvJh+qWHMYyBxcX_EA9__u4A@mail.gmail.com/

I think the concensus was that we should squelch the false warning on older compilers with -Wno-missing-braces, but then the discussion has stalled by a suggestion to introduce a way to detect older compilers that is different from how we do so at the same time, and went nowhere.

Hopefully we can add a simple -Wno-* without waiting for whole config.mak thing getting revamped this time?

Previous: Đoàn Trần Công DanhNext: Jeff King
Message 2 of 11 in “merge-file: fix build warning with gcc 4.8.5”
  1. merge-file: fix build warning with gcc 4.8.5Đoàn Trần Công Danh, Jul 29, 2022
  2. Junio C HamanoJul 29, 2022
  3. Jeff KingJul 29, 2022
  4. Jeff KingJul 29, 2022
  5. Eric SunshineJul 29, 2022
  6. Jeff KingJul 29, 2022
  7. Junio C HamanoJul 29, 2022
  8. Đoàn Trần Công DanhJul 30, 2022
  9. Jeff KingJul 30, 2022
  10. brian m. carlsonJul 30, 2022
  11. Jeff KingJul 30, 2022

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.