diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-12-06 11:27:21 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-06 20:20:03 +0900 |
| commit | 47d72a74a737f06791c282a75baf2c573cdf42f6 (patch) | |
| tree | b5c04796ba6e418f79f9621bff13900442e956b3 /list-objects-filter.c | |
| parent | config.mak.dev: drop `-Wno-sign-compare` (diff) | |
| download | git-47d72a74a737f06791c282a75baf2c573cdf42f6.tar.gz git-47d72a74a737f06791c282a75baf2c573cdf42f6.zip | |
diff.h: fix index used to loop through unsigned integer
The `struct diff_flags` structure is essentially an array of flags, all
of which have the same type. We can thus use `sizeof()` to iterate
through all of the flags, which we do in `diff_flags_or()`. But while
the statement returns an unsigned integer, we used a signed integer to
iterate through the flags, which generates a warning.
Fix this by using `size_t` for the index instead.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter.c')
| -rw-r--r-- | list-objects-filter.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/list-objects-filter.c b/list-objects-filter.c index 4afa3029dc..dc598a081b 100644 --- a/list-objects-filter.c +++ b/list-objects-filter.c @@ -1,5 +1,4 @@ #define USE_THE_REPOSITORY_VARIABLE -#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "dir.h" |
