summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 11:27:30 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-06 20:20:05 +0900
commit89a0c5c024a53375a703a92dee11666d7ae11cd2 (patch)
tree5302a5a2e663e115ca7bb4be99c58bcd7c9f869e /diff.c
parentefb38ad49fb2dd7bf6e732df0c59f3c1aeba2f76 (diff)
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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions