diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-07 10:32:02 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-07 10:32:02 -0700 |
| commit | 79864519637f58c79d15ec5b49272c0580201af3 (patch) | |
| tree | 071f437da1041a6000dbdcaeac68463958ffc9c1 /gpg-interface.c | |
| parent | 6c5be97e4eee040a2d5303e5650fa7cc8a37dbd8 (diff) | |
| parent | d66fe0726bfb3fb1e3665f7e64b160440007d98e (diff) | |
Merge branch 'ps/no-writable-strings' into jk/imap-send-plug-all-msgs-leak
* ps/no-writable-strings: (46 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 'gpg-interface.c')
| -rw-r--r-- | gpg-interface.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index 1ff94266d2..5c824aeb25 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -27,7 +27,9 @@ static void gpg_interface_lazy_init(void) } static char *configured_signing_key; -static const char *ssh_default_key_command, *ssh_allowed_signers, *ssh_revocation_file; +static char *ssh_default_key_command; +static char *ssh_allowed_signers; +static char *ssh_revocation_file; static enum signature_trust_level configured_min_trust_level = TRUST_UNDEFINED; struct gpg_format { @@ -725,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; @@ -781,7 +783,7 @@ static int git_gpg_config(const char *var, const char *value, if (fmtname) { fmt = get_format_by_name(fmtname); - return git_config_string(&fmt->program, var, value); + return git_config_string((char **) &fmt->program, var, value); } return 0; |
