Commit b688100
scalar: address -Wsign-compare warnings
There are two -Wsign-compare warnings in "scalar.c", both of which are
trivial:
- We mistakenly use a signed integer to loop towards an upper unsigned
bound in `cmd_reconfigure()`.
- We subtract `path_sep - enlistment->buf`, which results in a signed
integer, and use the value in a ternary expression where second
value is unsigned. But as `path_sep` is being assigned the result of
`find_last_dir_sep(enlistment->buf + offset)` we know that it must
always be bigger than or equal to `enlistment->buf`, and thus the
result will be positive.
Address both of these warnings.
Signed-off-by: Patrick Steinhardt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 1a4ef55 commit b688100
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
383 | | - | |
| 382 | + | |
384 | 383 | | |
385 | 384 | | |
386 | 385 | | |
| |||
655 | 654 | | |
656 | 655 | | |
657 | 656 | | |
658 | | - | |
| 657 | + | |
659 | 658 | | |
660 | 659 | | |
661 | 660 | | |
| |||
673 | 672 | | |
674 | 673 | | |
675 | 674 | | |
676 | | - | |
| 675 | + | |
677 | 676 | | |
678 | 677 | | |
679 | 678 | | |
| |||
0 commit comments