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 /t/helper/test-parse-options.c | |
| parent | f7c607fac3dd906c46d0d86ff174215698912316 (diff) | |
| parent | e03d2a9ccb88c7ff42237f5890a05e071497f8ae (diff) | |
| download | git-4156b6a741c7fb15a4eccb320612fb6e453f439c.tar.gz | |
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 't/helper/test-parse-options.c')
| -rw-r--r-- | t/helper/test-parse-options.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 5da359486c..bfe45ec68b 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -174,7 +174,6 @@ int cmd__parse_options(int argc, const char **argv) OPT_ALIAS('Z', "alias-target", "alias-source"), OPT_END(), }; - int i; int ret = 0; trace2_cmd_name("_parse_"); @@ -198,10 +197,10 @@ int cmd__parse_options(int argc, const char **argv) show(&expect, &ret, "dry run: %s", dry_run ? "yes" : "no"); show(&expect, &ret, "file: %s", file ? file : "(not set)"); - for (i = 0; i < list.nr; i++) + for (size_t i = 0; i < list.nr; i++) show(&expect, &ret, "list: %s", list.items[i].string); - for (i = 0; i < argc; i++) + for (int i = 0; i < argc; i++) show(&expect, &ret, "arg %02d: %s", i, argv[i]); expect.strdup_strings = 1; |
