From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v4 04/27] reftable: cast away constness when assigning constants to records
Date: Tue, 4 Jun 2024 14:37:10 +0200 [thread overview]
Message-ID: <d0a2a2f6c55af6da9703a1d64f45f77f4c00cd80.1717504517.git.ps@pks.im> (raw)
In-Reply-To: <cover.1717504517.git.ps@pks.im>
[-- Attachment #1: Type: text/plain, Size: 14245 bytes --]
The reftable records are used in multiple ways throughout the reftable
library. In many of those cases they merely act as input to a function
without getting modified by it at all. Most importantly, this happens
when writing records and when querying for records.
We rely on this in our tests and thus assign string constants to those
fields, which is about to generate warnings as those fields are of type
`char *`. While we could go through the process and instead allocate
those strings in all of our tests, this feels quite unnecessary.
Instead, add casts to `char *` for all of those strings. As this is part
of our tests, this also nicely serves as a demonstration that nothing
writes or frees those string constants, which would otherwise lead to
segfaults.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
reftable/block_test.c | 2 +-
reftable/merged_test.c | 44 +++++++++++++++++------------------
reftable/readwrite_test.c | 32 +++++++++++++-------------
reftable/stack_test.c | 48 +++++++++++++++++++--------------------
4 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/reftable/block_test.c b/reftable/block_test.c
index 26a9cfbc83..90aecd5a7c 100644
--- a/reftable/block_test.c
+++ b/reftable/block_test.c
@@ -42,7 +42,7 @@ static void test_block_read_write(void)
block_writer_init(&bw, BLOCK_TYPE_REF, block.data, block_size,
header_off, hash_size(GIT_SHA1_FORMAT_ID));
- rec.u.ref.refname = "";
+ rec.u.ref.refname = (char *) "";
rec.u.ref.value_type = REFTABLE_REF_DELETION;
n = block_writer_add(&bw, &rec);
EXPECT(n == REFTABLE_API_ERROR);
diff --git a/reftable/merged_test.c b/reftable/merged_test.c
index 530fc82d1c..6d1159d12d 100644
--- a/reftable/merged_test.c
+++ b/reftable/merged_test.c
@@ -124,13 +124,13 @@ static void readers_destroy(struct reftable_reader **readers, size_t n)
static void test_merged_between(void)
{
struct reftable_ref_record r1[] = { {
- .refname = "b",
+ .refname = (char *) "b",
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 1, 2, 3, 0 },
} };
struct reftable_ref_record r2[] = { {
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 2,
.value_type = REFTABLE_REF_DELETION,
} };
@@ -165,38 +165,38 @@ static void test_merged(void)
{
struct reftable_ref_record r1[] = {
{
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 1 },
},
{
- .refname = "b",
+ .refname = (char *) "b",
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 1 },
},
{
- .refname = "c",
+ .refname = (char *) "c",
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 1 },
}
};
struct reftable_ref_record r2[] = { {
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 2,
.value_type = REFTABLE_REF_DELETION,
} };
struct reftable_ref_record r3[] = {
{
- .refname = "c",
+ .refname = (char *) "c",
.update_index = 3,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 2 },
},
{
- .refname = "d",
+ .refname = (char *) "d",
.update_index = 3,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = { 1 },
@@ -291,46 +291,46 @@ static void test_merged_logs(void)
{
struct reftable_log_record r1[] = {
{
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 2,
.value_type = REFTABLE_LOG_UPDATE,
.value.update = {
.old_hash = { 2 },
/* deletion */
- .name = "jane doe",
- .email = "jane@invalid",
- .message = "message2",
+ .name = (char *) "jane doe",
+ .email = (char *) "jane@invalid",
+ .message = (char *) "message2",
}
},
{
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 1,
.value_type = REFTABLE_LOG_UPDATE,
.value.update = {
.old_hash = { 1 },
.new_hash = { 2 },
- .name = "jane doe",
- .email = "jane@invalid",
- .message = "message1",
+ .name = (char *) "jane doe",
+ .email = (char *) "jane@invalid",
+ .message = (char *) "message1",
}
},
};
struct reftable_log_record r2[] = {
{
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 3,
.value_type = REFTABLE_LOG_UPDATE,
.value.update = {
.new_hash = { 3 },
- .name = "jane doe",
- .email = "jane@invalid",
- .message = "message3",
+ .name = (char *) "jane doe",
+ .email = (char *) "jane@invalid",
+ .message = (char *) "message3",
}
},
};
struct reftable_log_record r3[] = {
{
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 2,
.value_type = REFTABLE_LOG_DELETION,
},
@@ -406,7 +406,7 @@ static void test_default_write_opts(void)
reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts);
struct reftable_ref_record rec = {
- .refname = "master",
+ .refname = (char *) "master",
.update_index = 1,
};
int err;
diff --git a/reftable/readwrite_test.c b/reftable/readwrite_test.c
index a6dbd214c5..c55019232b 100644
--- a/reftable/readwrite_test.c
+++ b/reftable/readwrite_test.c
@@ -86,7 +86,7 @@ static void write_table(char ***names, struct strbuf *buf, int N,
log.update_index = update_index;
log.value_type = REFTABLE_LOG_UPDATE;
set_test_hash(log.value.update.new_hash, i);
- log.value.update.message = "message";
+ log.value.update.message = (char *) "message";
n = reftable_writer_add_log(w, &log);
EXPECT(n == 0);
@@ -118,15 +118,15 @@ static void test_log_buffer_size(void)
int err;
int i;
struct reftable_log_record
- log = { .refname = "refs/heads/master",
+ log = { .refname = (char *) "refs/heads/master",
.update_index = 0xa,
.value_type = REFTABLE_LOG_UPDATE,
.value = { .update = {
- .name = "Han-Wen Nienhuys",
- .email = "hanwen@google.com",
+ .name = (char *) "Han-Wen Nienhuys",
+ .email = (char *) "hanwen@google.com",
.tz_offset = 100,
.time = 0x5e430672,
- .message = "commit: 9\n",
+ .message = (char *) "commit: 9\n",
} } };
struct reftable_writer *w =
reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts);
@@ -156,15 +156,15 @@ static void test_log_overflow(void)
};
int err;
struct reftable_log_record log = {
- .refname = "refs/heads/master",
+ .refname = (char *) "refs/heads/master",
.update_index = 0xa,
.value_type = REFTABLE_LOG_UPDATE,
.value = {
.update = {
.old_hash = { 1 },
.new_hash = { 2 },
- .name = "Han-Wen Nienhuys",
- .email = "hanwen@google.com",
+ .name = (char *) "Han-Wen Nienhuys",
+ .email = (char *) "hanwen@google.com",
.tz_offset = 100,
.time = 0x5e430672,
.message = msg,
@@ -293,14 +293,14 @@ static void test_log_zlib_corruption(void)
char message[100] = { 0 };
int err, i, n;
struct reftable_log_record log = {
- .refname = "refname",
+ .refname = (char *) "refname",
.value_type = REFTABLE_LOG_UPDATE,
.value = {
.update = {
.new_hash = { 1 },
.old_hash = { 2 },
- .name = "My Name",
- .email = "myname@invalid",
+ .name = (char *) "My Name",
+ .email = (char *) "myname@invalid",
.message = message,
},
},
@@ -728,7 +728,7 @@ static void test_write_empty_key(void)
struct reftable_writer *w =
reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts);
struct reftable_ref_record ref = {
- .refname = "",
+ .refname = (char *) "",
.update_index = 1,
.value_type = REFTABLE_REF_DELETION,
};
@@ -752,18 +752,18 @@ static void test_write_key_order(void)
reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts);
struct reftable_ref_record refs[2] = {
{
- .refname = "b",
+ .refname = (char *) "b",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
.value = {
- .symref = "target",
+ .symref = (char *) "target",
},
}, {
- .refname = "a",
+ .refname = (char *) "a",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
.value = {
- .symref = "target",
+ .symref = (char *) "target",
},
}
};
diff --git a/reftable/stack_test.c b/reftable/stack_test.c
index 07d89b45da..4abf92636d 100644
--- a/reftable/stack_test.c
+++ b/reftable/stack_test.c
@@ -156,10 +156,10 @@ static void test_reftable_stack_add_one(void)
struct reftable_stack *st = NULL;
int err;
struct reftable_ref_record ref = {
- .refname = "HEAD",
+ .refname = (char *) "HEAD",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
struct reftable_ref_record dest = { NULL };
struct stat stat_result = { 0 };
@@ -216,16 +216,16 @@ static void test_reftable_stack_uptodate(void)
int err;
struct reftable_ref_record ref1 = {
- .refname = "HEAD",
+ .refname = (char *) "HEAD",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
struct reftable_ref_record ref2 = {
- .refname = "branch2",
+ .refname = (char *) "branch2",
.update_index = 2,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
@@ -264,10 +264,10 @@ static void test_reftable_stack_transaction_api(void)
struct reftable_addition *add = NULL;
struct reftable_ref_record ref = {
- .refname = "HEAD",
+ .refname = (char *) "HEAD",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
struct reftable_ref_record dest = { NULL };
@@ -313,7 +313,7 @@ static void test_reftable_stack_transaction_api_performs_auto_compaction(void)
struct reftable_ref_record ref = {
.update_index = reftable_stack_next_update_index(st),
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
char name[100];
@@ -356,7 +356,7 @@ static void test_reftable_stack_transaction_api_performs_auto_compaction(void)
static void test_reftable_stack_auto_compaction_fails_gracefully(void)
{
struct reftable_ref_record ref = {
- .refname = "refs/heads/master",
+ .refname = (char *) "refs/heads/master",
.update_index = 1,
.value_type = REFTABLE_REF_VAL1,
.value.val1 = {0x01},
@@ -409,16 +409,16 @@ static void test_reftable_stack_update_index_check(void)
struct reftable_stack *st = NULL;
int err;
struct reftable_ref_record ref1 = {
- .refname = "name1",
+ .refname = (char *) "name1",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
struct reftable_ref_record ref2 = {
- .refname = "name2",
+ .refname = (char *) "name2",
.update_index = 1,
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
err = reftable_new_stack(&st, dir, cfg);
@@ -561,7 +561,7 @@ static void test_reftable_stack_log_normalize(void)
struct reftable_stack *st = NULL;
char *dir = get_tmp_dir(__LINE__);
struct reftable_log_record input = {
- .refname = "branch",
+ .refname = (char *) "branch",
.update_index = 1,
.value_type = REFTABLE_LOG_UPDATE,
.value = {
@@ -582,11 +582,11 @@ static void test_reftable_stack_log_normalize(void)
err = reftable_new_stack(&st, dir, cfg);
EXPECT_ERR(err);
- input.value.update.message = "one\ntwo";
+ input.value.update.message = (char *) "one\ntwo";
err = reftable_stack_add(st, &write_test_log, &arg);
EXPECT(err == REFTABLE_API_ERROR);
- input.value.update.message = "one";
+ input.value.update.message = (char *) "one";
err = reftable_stack_add(st, &write_test_log, &arg);
EXPECT_ERR(err);
@@ -594,7 +594,7 @@ static void test_reftable_stack_log_normalize(void)
EXPECT_ERR(err);
EXPECT(0 == strcmp(dest.value.update.message, "one\n"));
- input.value.update.message = "two\n";
+ input.value.update.message = (char *) "two\n";
arg.update_index = 2;
err = reftable_stack_add(st, &write_test_log, &arg);
EXPECT_ERR(err);
@@ -697,9 +697,9 @@ static void test_reftable_stack_hash_id(void)
int err;
struct reftable_ref_record ref = {
- .refname = "master",
+ .refname = (char *) "master",
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "target",
+ .value.symref = (char *) "target",
.update_index = 1,
};
struct reftable_write_options cfg32 = { .hash_id = GIT_SHA256_FORMAT_ID };
@@ -879,7 +879,7 @@ static void test_reftable_stack_auto_compaction(void)
.refname = name,
.update_index = reftable_stack_next_update_index(st),
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
snprintf(name, sizeof(name), "branch%04d", i);
@@ -913,7 +913,7 @@ static void test_reftable_stack_add_performs_auto_compaction(void)
struct reftable_ref_record ref = {
.update_index = reftable_stack_next_update_index(st),
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
/*
@@ -964,7 +964,7 @@ static void test_reftable_stack_compaction_concurrent(void)
.refname = name,
.update_index = reftable_stack_next_update_index(st1),
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
snprintf(name, sizeof(name), "branch%04d", i);
@@ -1014,7 +1014,7 @@ static void test_reftable_stack_compaction_concurrent_clean(void)
.refname = name,
.update_index = reftable_stack_next_update_index(st1),
.value_type = REFTABLE_REF_SYMREF,
- .value.symref = "master",
+ .value.symref = (char *) "master",
};
snprintf(name, sizeof(name), "branch%04d", i);
--
2.45.1.410.g58bac47f8e.dirty
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-06-04 12:37 UTC|newest]
Thread overview: 205+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 12:44 [PATCH 00/19] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 01/19] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-05-29 16:58 ` Junio C Hamano
2024-05-30 11:29 ` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 02/19] global: assign non-const strings as required Patrick Steinhardt
2024-05-29 17:25 ` Junio C Hamano
2024-05-30 11:29 ` Patrick Steinhardt
2024-05-30 19:38 ` Junio C Hamano
2024-05-31 13:00 ` Patrick Steinhardt
2024-05-31 13:33 ` Patrick Steinhardt
2024-05-31 15:27 ` Junio C Hamano
2024-05-31 15:27 ` Junio C Hamano
2024-06-05 10:46 ` Jeff King
2024-06-05 17:13 ` Junio C Hamano
2024-06-08 10:59 ` Jeff King
2024-06-06 10:36 ` Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 03/19] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-05-29 17:28 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-30 16:00 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 04/19] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 05/19] reftable: improve const correctness when assigning " Patrick Steinhardt
2024-05-29 17:43 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-30 16:07 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 06/19] refspec: remove global tag refspec structure Patrick Steinhardt
2024-05-29 17:47 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 07/19] http: do not assign string constant to non-const field Patrick Steinhardt
2024-05-29 19:39 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 08/19] line-log: always allocate the output prefix Patrick Steinhardt
2024-05-29 19:51 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 09/19] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-05-29 20:01 ` Junio C Hamano
2024-05-29 12:44 ` [PATCH 10/19] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 11/19] send-pack: always allocate receive status Patrick Steinhardt
2024-05-29 12:44 ` [PATCH 12/19] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-05-29 20:21 ` Junio C Hamano
2024-05-30 11:30 ` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 13/19] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-05-29 20:23 ` Junio C Hamano
2024-05-29 12:45 ` [PATCH 14/19] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 15/19] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 16/19] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-05-29 20:55 ` Junio C Hamano
2024-05-30 11:31 ` Patrick Steinhardt
2024-05-30 16:30 ` Junio C Hamano
2024-05-29 12:45 ` [PATCH 17/19] builtin/rebase: adapt code to not assign string constants to non-const Patrick Steinhardt
2024-05-29 21:01 ` Junio C Hamano
2024-05-30 11:31 ` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 18/19] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-05-29 12:45 ` [PATCH 19/19] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-05-29 12:52 ` [PATCH 00/19] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 " Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 01/19] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 02/19] global: assign non-const strings as required Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 03/19] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 04/19] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 05/19] refspec: remove global tag refspec structure Patrick Steinhardt
2024-05-30 12:50 ` [PATCH v2 06/19] http: do not assign string constant to non-const field Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 07/19] line-log: always allocate the output prefix Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 08/19] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 09/19] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 10/19] send-pack: always allocate receive status Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 11/19] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 12/19] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 13/19] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 14/19] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 15/19] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 16/19] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 17/19] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-05-30 12:51 ` [PATCH v2 18/19] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-05-30 12:52 ` [PATCH v2 19/19] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-05-31 9:13 ` [PATCH v2 00/19] Compile with `-Wwrite-strings` Junio C Hamano
2024-05-31 12:10 ` Patrick Steinhardt
2024-06-03 9:38 ` [PATCH v3 00/27] " Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-03 18:08 ` Junio C Hamano
2024-06-03 9:39 ` [PATCH v3 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-03 18:11 ` Junio C Hamano
2024-06-03 9:39 ` [PATCH v3 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-03 9:39 ` [PATCH v3 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-03 16:57 ` Eric Sunshine
2024-06-03 19:04 ` Junio C Hamano
2024-06-04 6:42 ` Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-03 9:40 ` [PATCH v3 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-03 9:41 ` [PATCH v3 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-03 9:41 ` [PATCH v3 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-03 16:59 ` [PATCH v3 00/27] Compile with `-Wwrite-strings` Junio C Hamano
2024-06-04 12:36 ` [PATCH v4 " Patrick Steinhardt
2024-06-04 12:36 ` [PATCH v4 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-04 12:37 ` Patrick Steinhardt [this message]
2024-06-04 12:37 ` [PATCH v4 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-06 6:02 ` Junio C Hamano
2024-06-06 6:10 ` Junio C Hamano
2024-06-06 10:03 ` Patrick Steinhardt
2024-06-06 16:25 ` Junio C Hamano
2024-06-07 4:52 ` Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-04 12:37 ` [PATCH v4 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-04 12:38 ` [PATCH v4 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-04 14:06 ` Phillip Wood
2024-06-05 5:40 ` Patrick Steinhardt
2024-06-05 13:06 ` Phillip Wood
2024-06-06 9:50 ` Patrick Steinhardt
2024-06-05 16:11 ` Junio C Hamano
2024-06-04 12:38 ` [PATCH v4 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-04 14:10 ` Phillip Wood
2024-06-04 12:38 ` [PATCH v4 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-04 12:39 ` [PATCH v4 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 00/27] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-06 10:27 ` [PATCH v5 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-06 17:54 ` Junio C Hamano
2024-06-06 10:28 ` [PATCH v5 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-06 10:28 ` [PATCH v5 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-06 10:29 ` [PATCH v5 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 00/27] Compile with `-Wwrite-strings` Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 01/27] global: improve const correctness when assigning string constants Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 02/27] global: convert intentionally-leaking config strings to consts Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 03/27] refs/reftable: stop micro-optimizing refname allocations on copy Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 04/27] reftable: cast away constness when assigning constants to records Patrick Steinhardt
2024-06-07 6:37 ` [PATCH v6 05/27] refspec: remove global tag refspec structure Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 06/27] builtin/remote: cast away constness in `get_head_names()` Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 07/27] diff: cast string constant in `fill_textconv()` Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 08/27] line-log: stop assigning string constant to file parent buffer Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 09/27] line-log: always allocate the output prefix Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 10/27] entry: refactor how we remove items for delayed checkouts Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 11/27] ident: add casts for fallback name and GECOS Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 12/27] object-file: mark cached object buffers as const Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 13/27] object-file: make `buf` parameter of `index_mem()` a constant Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 14/27] pretty: add casts for decoration option pointers Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 15/27] compat/win32: fix const-correctness with string constants Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 16/27] http: do not assign string constant to non-const field Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 17/27] parse-options: cast long name for OPTION_ALIAS Patrick Steinhardt
2024-06-07 6:38 ` [PATCH v6 18/27] send-pack: always allocate receive status Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 19/27] remote-curl: avoid assigning string constant to non-const variable Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 20/27] revision: always store allocated strings in output encoding Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 21/27] mailmap: always store allocated strings in mailmap blob Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 22/27] imap-send: drop global `imap_server_conf` variable Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 23/27] imap-send: fix leaking memory in `imap_server_conf` Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 24/27] builtin/rebase: do not assign default backend to non-constant field Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 25/27] builtin/rebase: always store allocated string in `options.strategy` Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 26/27] builtin/merge: always store allocated strings in `pull_twohead` Patrick Steinhardt
2024-06-07 6:39 ` [PATCH v6 27/27] config.mak.dev: enable `-Wwrite-strings` warning Patrick Steinhardt
2024-06-07 17:34 ` [PATCH v6 00/27] Compile with `-Wwrite-strings` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0a2a2f6c55af6da9703a1d64f45f77f4c00cd80.1717504517.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).