]> git.ipfire.org Git - thirdparty/git.git/commit
mingw: avoid the comma operator
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 17 Nov 2025 20:46:14 +0000 (20:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Nov 2025 22:19:21 +0000 (14:19 -0800)
commitaf3919816f20c7c54e6d377945b2f6344b3588fe
treea3c0c713eb8bb18743d43a4c177a627764218d7f
parentbb5c624209fcaebd60b9572b2cc8c61086e39b57
mingw: avoid the comma operator

The pattern `return errno = ..., -1;` is observed several times in
`compat/mingw.c`. It has served us well over the years, but now clang
starts complaining:

  compat/mingw.c:723:24: error: possible misuse of comma operator here [-Werror,-Wcomma]
    723 |                 return errno = ENOSYS, -1;
        |                                      ^

See for example this failing workflow run:
https://github.com/git-for-windows/git-sdk-arm64/actions/runs/15457893907/job/43513458823#step:8:201

Let's appease clang (and also reduce the use of the no longer common
comma operator).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c