summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-reftable-basics.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-06-17 15:55:57 -0700
committerJunio C Hamano <gitster@pobox.com>2024-06-17 15:55:58 -0700
commit4216329457926de0d977975fe9e3eef97a08be54 (patch)
tree660e30ad6d2cc76d1e937f157ef608887af2e919 /t/unit-tests/t-reftable-basics.c
parent42b8b5bfd04c993ceb4c79a995cf9f6851aee95b (diff)
parentd66fe0726bfb3fb1e3665f7e64b160440007d98e (diff)
Merge branch 'ps/no-writable-strings'
Building with "-Werror -Wwrite-strings" is now supported. * ps/no-writable-strings: (27 commits) config.mak.dev: enable `-Wwrite-strings` warning builtin/merge: always store allocated strings in `pull_twohead` builtin/rebase: always store allocated string in `options.strategy` builtin/rebase: do not assign default backend to non-constant field imap-send: fix leaking memory in `imap_server_conf` imap-send: drop global `imap_server_conf` variable mailmap: always store allocated strings in mailmap blob revision: always store allocated strings in output encoding remote-curl: avoid assigning string constant to non-const variable send-pack: always allocate receive status parse-options: cast long name for OPTION_ALIAS http: do not assign string constant to non-const field compat/win32: fix const-correctness with string constants pretty: add casts for decoration option pointers object-file: make `buf` parameter of `index_mem()` a constant object-file: mark cached object buffers as const ident: add casts for fallback name and GECOS entry: refactor how we remove items for delayed checkouts line-log: always allocate the output prefix line-log: stop assigning string constant to file parent buffer ...
Diffstat (limited to 't/unit-tests/t-reftable-basics.c')
-rw-r--r--t/unit-tests/t-reftable-basics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/unit-tests/t-reftable-basics.c b/t/unit-tests/t-reftable-basics.c
index 529049af12..4e80bdf16d 100644
--- a/t/unit-tests/t-reftable-basics.c
+++ b/t/unit-tests/t-reftable-basics.c
@@ -54,15 +54,15 @@ static void test_binsearch(void)
static void test_names_length(void)
{
- char *a[] = { "a", "b", NULL };
+ const char *a[] = { "a", "b", NULL };
check_int(names_length(a), ==, 2);
}
static void test_names_equal(void)
{
- char *a[] = { "a", "b", "c", NULL };
- char *b[] = { "a", "b", "d", NULL };
- char *c[] = { "a", "b", NULL };
+ const char *a[] = { "a", "b", "c", NULL };
+ const char *b[] = { "a", "b", "d", NULL };
+ const char *c[] = { "a", "b", NULL };
check(names_equal(a, a));
check(!names_equal(a, b));