Commit 7e61ebc
authored
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 | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
723 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
| |||
3096 | 3098 | | |
3097 | 3099 | | |
3098 | 3100 | | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
3105 | 3109 | | |
3106 | 3110 | | |
3107 | 3111 | | |
| |||
3134 | 3138 | | |
3135 | 3139 | | |
3136 | 3140 | | |
3137 | | - | |
3138 | | - | |
3139 | | - | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
3140 | 3145 | | |
3141 | | - | |
3142 | | - | |
3143 | | - | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
3144 | 3150 | | |
3145 | 3151 | | |
3146 | 3152 | | |
| |||
3160 | 3166 | | |
3161 | 3167 | | |
3162 | 3168 | | |
3163 | | - | |
3164 | | - | |
3165 | | - | |
3166 | | - | |
3167 | | - | |
3168 | | - | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
3169 | 3177 | | |
3170 | 3178 | | |
3171 | 3179 | | |
| |||
0 commit comments