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

Re: [PATCH 3/4] Fix comma warnings with clang on Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2025, 23:51 UTC
Message-ID
<xmqqplfkfkol.fsf@gitster.g>
In-Reply-To
<20250603230646.2322671-3-mh@glandium.org>
Mike Hommey <mh@glandium.org> writes:
> Subject: Re: [PATCH 3/4] Fix comma warnings with clang on Windows

Common to all four patches, as "Fix" does not quite tell the story, please choose more appropriate verb. For example, judging from how this was rewritten ...

Show 6 quoted lines
> -	if ((oflags & ~O_CREAT) != (O_WRONLY | O_APPEND))
> -		return errno = ENOSYS, -1;
> +	if ((oflags & ~O_CREAT) != (O_WRONLY | O_APPEND)) {
> +		errno = ENOSYS;
> +		return -1;
> +	}

... the warning is a false positive (i.e. the code does what the author intended it to do), so this is more like "squelching" the warning.

I obviously like the style after this patch. I just thought that the proposed log message, especially its title, were not clear enough to tell which ones are real fixes and which ones are workarounds.

Thanks.
Previous: Mike HommeyNext: Mike Hommey
Message 6 of 11 in “Fix maybe-uninitialized warning with GCC at -O3”
  1. 1/4 Fix maybe-uninitialized warning with GCC at -O3Mike Hommey, Jun 3, 2025
  2. 4/4 Fix unreachable-code warning with clang on WindowsMike Hommey, Jun 3, 2025
  3. Patrick SteinhardtJun 4, 2025
  4. Junio C HamanoJun 4, 2025
  5. 3/4 Fix comma warnings with clang on WindowsMike Hommey, Jun 3, 2025
  6. Junio C HamanoJun 3, 2025
  7. 2/4 Fix use-after-free warning with GCC at -O3Mike Hommey, Jun 3, 2025
  8. Junio C HamanoJun 3, 2025
  9. Patrick SteinhardtJun 4, 2025
  10. Patrick SteinhardtJun 4, 2025
  11. Jeff KingJun 6, 2025

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.