diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:10 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:11 -0800 |
| commit | 4156b6a741c7fb15a4eccb320612fb6e453f439c (patch) | |
| tree | 203f68166cc5f2337fd80f6628c3b344d2dd3abf /csum-file.c | |
| parent | Merge branch 'kn/reftable-writer-log-write-verify' (diff) | |
| parent | t/helper: don't depend on implicit wraparound (diff) | |
| download | git-4156b6a741c7fb15a4eccb320612fb6e453f439c.tar.gz git-4156b6a741c7fb15a4eccb320612fb6e453f439c.zip | |
Merge branch 'ps/build-sign-compare'
Start working to make the codebase buildable with -Wsign-compare.
* ps/build-sign-compare:
t/helper: don't depend on implicit wraparound
scalar: address -Wsign-compare warnings
builtin/patch-id: fix type of `get_one_patchid()`
builtin/blame: fix type of `length` variable when emitting object ID
gpg-interface: address -Wsign-comparison warnings
daemon: fix type of `max_connections`
daemon: fix loops that have mismatching integer types
global: trivial conversions to fix `-Wsign-compare` warnings
pkt-line: fix -Wsign-compare warning on 32 bit platform
csum-file: fix -Wsign-compare warning on 32-bit platform
diff.h: fix index used to loop through unsigned integer
config.mak.dev: drop `-Wno-sign-compare`
global: mark code units that generate warnings with `-Wsign-compare`
compat/win32: fix -Wsign-compare warning in "wWinMain()"
compat/regex: explicitly ignore "-Wsign-compare" warnings
git-compat-util: introduce macros to disable "-Wsign-compare" warnings
Diffstat (limited to 'csum-file.c')
| -rw-r--r-- | csum-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csum-file.c b/csum-file.c index c203ebf11b..5716016e12 100644 --- a/csum-file.c +++ b/csum-file.c @@ -23,7 +23,7 @@ static void verify_buffer_or_die(struct hashfile *f, if (ret < 0) die_errno("%s: sha1 file read error", f->name); - if (ret != count) + if ((size_t)ret != count) die("%s: sha1 file truncated", f->name); if (memcmp(buf, f->check_buffer, count)) die("sha1 file '%s' validation error", f->name); |
