Commit d4d4b3d
mingw: avoid the comma operator (#5660)
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).1 file changed
+28
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| |||
2779 | 2781 | | |
2780 | 2782 | | |
2781 | 2783 | | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
2786 | | - | |
2787 | | - | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
2788 | 2792 | | |
2789 | 2793 | | |
2790 | 2794 | | |
| |||
2817 | 2821 | | |
2818 | 2822 | | |
2819 | 2823 | | |
2820 | | - | |
2821 | | - | |
2822 | | - | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
2823 | 2828 | | |
2824 | | - | |
2825 | | - | |
2826 | | - | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
2827 | 2833 | | |
2828 | 2834 | | |
2829 | 2835 | | |
| |||
2845 | 2851 | | |
2846 | 2852 | | |
2847 | 2853 | | |
2848 | | - | |
2849 | | - | |
2850 | | - | |
2851 | | - | |
2852 | | - | |
2853 | | - | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
2854 | 2862 | | |
2855 | 2863 | | |
2856 | 2864 | | |
| |||
0 commit comments