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

Re: [PATCH v2] maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statement

From
ronan@rjp.ie <ronan@rjp.ie>
Date
Nov 15, 2022, 16:32 UTC
Message-ID
<1ab6aa0e8178c88689f26b8df9ec75cb@rjp.ie>
In-Reply-To
<patch-v2-1.1-f37e99c9d59-20221115T160240Z-avarab@gmail.com>
November 15, 2022 9:04 AM, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> wrote:
Show 7 quoted lines
> Since (maintenance: add option to register in a specific config,
> 2022-11-09) we've been unable to build with "DEVELOPER=1" without
> "DEVOPTS=no-error", as the added code triggers a
> "-Wdeclaration-after-statement" warning.
> 
> And worse than that, the data handed to git_configset_clear() is
> uninitialized, as can be spotted with e.g.:
Sorry, I'm a little confused. I had sent v1, v2, and v3 of the "maintenance: add option [...]" patch, but as I understand it v2 had already been applied so I was asked to resubmit the changes from v3 rebased on next.
I had done that in [1], but these issues were caught in review so I submitted a v2 of that correction in [2] which declares the configsset earlier and unconditionally initializes it is cleared. Are these further issues discovered after [2] was applied, or was there some issue rebasing the patches?

[1] https://lore.kernel.org/git/20221110225310.7488-1-ronan@rjp.ie/ [2] https://lore.kernel.org/git/20221111231910.26769-1-ronan@rjp.ie/

Previous: Ævar Arnfjörð BjarmasonNext: Taylor Blau
Message 6 of 10 in “builtin/gc.c: fix -Wdeclaration-after-statement”
  1. builtin/gc.c: fix -Wdeclaration-after-statementÆvar Arnfjörð Bjarmason, Nov 15, 2022
  2. Johannes SchindelinNov 15, 2022
  3. Johannes SchindelinNov 15, 2022
  4. Ævar Arnfjörð BjarmasonNov 15, 2022
  5. maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statementÆvar Arnfjörð Bjarmason, Nov 15, 2022
  6. ronan@rjp.ieNov 15, 2022
  7. Taylor BlauNov 15, 2022
  8. ronan@rjp.ieNov 15, 2022
  9. Taylor BlauNov 15, 2022
  10. Taylor BlauNov 15, 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.