diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-12-06 11:27:24 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-06 20:20:04 +0900 |
| commit | 80c9e70ebe871f0826bc101142c66ff783405100 (patch) | |
| tree | c95f04cef2dc0abb2d1fe8e4470e9e385e637b12 /builtin/difftool.c | |
| parent | 25435e4ad87aa484ce0d9d2adf3aa407f0241704 (diff) | |
| download | git-80c9e70ebe871f0826bc101142c66ff783405100.tar.gz | |
global: trivial conversions to fix `-Wsign-compare` warnings
We have a bunch of loops which iterate up to an unsigned boundary using
a signed index, which generates warnigs because we compare a signed and
unsigned value in the loop condition. Address these sites for trivial
cases and enable `-Wsign-compare` warnings for these code units.
This patch only adapts those code units where we can drop the
`DISABLE_SIGN_COMPARE_WARNINGS` macro in the same step.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/difftool.c')
| -rw-r--r-- | builtin/difftool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index 1914708a76..03a8bb92a9 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -13,7 +13,6 @@ */ #define USE_THE_REPOSITORY_VARIABLE -#define DISABLE_SIGN_COMPARE_WARNINGS #include "builtin.h" @@ -367,7 +366,8 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix, char *lbase_dir = NULL, *rbase_dir = NULL; size_t ldir_len, rdir_len, wtdir_len; const char *workdir, *tmp; - int ret = 0, i; + int ret = 0; + size_t i; FILE *fp = NULL; struct hashmap working_tree_dups = HASHMAP_INIT(working_tree_entry_cmp, NULL); |
