]> git.99rst.org Git - git.git/commit
compat/win32: fix -Wsign-compare warning in "wWinMain()"
authorPatrick Steinhardt <redacted>
Fri, 6 Dec 2024 10:27:18 +0000 (11:27 +0100)
committerJunio C Hamano <redacted>
Fri, 6 Dec 2024 11:20:01 +0000 (20:20 +0900)
commit709fdce0893f93464435841e0eb9f6df3fd73807
tree33bf33aa4f19493368bd0ae5852eb3dc3045aac2
parent6e1d0ce47014f2d8434c54ef70dc9b43602652a5
compat/win32: fix -Wsign-compare warning in "wWinMain()"

GCC generates a warning in "headless.c" because we compare `slash` with
`size`, where the former is an `int` and the latter is a `size_t`. Fix
the warning by storing `slash` as a `size_t`, as well.

This commit is being singled out because the file does not include the
"git-compat-util.h" header, and consequently, we cannot easily mark it
with the `DISABLE_SIGN_COMPARE_WARNING` macro.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
compat/win32/headless.c
git clone https://git.99rst.org/PROJECT