Commit cca45ce
committed
mingw: avoid the comma operator (git-for-windows#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 | | |
| |||
2777 | 2779 | | |
2778 | 2780 | | |
2779 | 2781 | | |
2780 | | - | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
2786 | 2790 | | |
2787 | 2791 | | |
2788 | 2792 | | |
| |||
2815 | 2819 | | |
2816 | 2820 | | |
2817 | 2821 | | |
2818 | | - | |
2819 | | - | |
2820 | | - | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
2821 | 2826 | | |
2822 | | - | |
2823 | | - | |
2824 | | - | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
2825 | 2831 | | |
2826 | 2832 | | |
2827 | 2833 | | |
| |||
2841 | 2847 | | |
2842 | 2848 | | |
2843 | 2849 | | |
2844 | | - | |
2845 | | - | |
2846 | | - | |
2847 | | - | |
2848 | | - | |
2849 | | - | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2850 | 2858 | | |
2851 | 2859 | | |
2852 | 2860 | | |
| |||
0 commit comments