Commit 762bcee
committed
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>1 parent fc4c0a2 commit 762bcee
1 file changed
+28
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
505 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
| |||
2497 | 2499 | | |
2498 | 2500 | | |
2499 | 2501 | | |
2500 | | - | |
2501 | | - | |
2502 | | - | |
2503 | | - | |
2504 | | - | |
2505 | | - | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
2506 | 2510 | | |
2507 | 2511 | | |
2508 | 2512 | | |
| |||
2535 | 2539 | | |
2536 | 2540 | | |
2537 | 2541 | | |
2538 | | - | |
2539 | | - | |
2540 | | - | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
2541 | 2546 | | |
2542 | | - | |
2543 | | - | |
2544 | | - | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
2545 | 2551 | | |
2546 | 2552 | | |
2547 | 2553 | | |
| |||
2561 | 2567 | | |
2562 | 2568 | | |
2563 | 2569 | | |
2564 | | - | |
2565 | | - | |
2566 | | - | |
2567 | | - | |
2568 | | - | |
2569 | | - | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
2570 | 2578 | | |
2571 | 2579 | | |
2572 | 2580 | | |
| |||
0 commit comments