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 /gpg-interface.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 'gpg-interface.c')
| -rw-r--r-- | gpg-interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index 5193223714..71a9382a61 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -727,7 +727,7 @@ static int git_gpg_config(const char *var, const char *value, void *cb UNUSED) { struct gpg_format *fmt = NULL; - char *fmtname = NULL; + const char *fmtname = NULL; char *trust; int ret; |
