diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-06-07 08:37:39 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-07 10:30:48 -0700 |
| commit | b567004b4b43f9b0d88aa1f0b15698eae8f15836 (patch) | |
| tree | fc7b75831c1eb79a89c0196fbb78bd6b7d09d0b1 /builtin/log.c | |
| parent | Merge branch 'ps/leakfixes' into ps/no-writable-strings (diff) | |
| download | git-b567004b4b43f9b0d88aa1f0b15698eae8f15836.tar.gz git-b567004b4b43f9b0d88aa1f0b15698eae8f15836.zip | |
global: improve const correctness when assigning string constants
We're about to enable `-Wwrite-strings`, which changes the type of
string constants to `const char[]`. Fix various sites where we assign
such constants to non-const variables.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
| -rw-r--r-- | builtin/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 78a247d8a9..b8846a9458 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1283,7 +1283,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids) o2->flags = flags2; } -static void gen_message_id(struct rev_info *info, char *base) +static void gen_message_id(struct rev_info *info, const char *base) { struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, "%s.%"PRItime".git.%s", base, |
