diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-17 15:55:57 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-17 15:55:58 -0700 |
| commit | 4216329457926de0d977975fe9e3eef97a08be54 (patch) | |
| tree | 660e30ad6d2cc76d1e937f157ef608887af2e919 /diffcore-rename.c | |
| parent | Merge branch 'jk/am-retry' (diff) | |
| parent | config.mak.dev: enable `-Wwrite-strings` warning (diff) | |
| download | git-4216329457926de0d977975fe9e3eef97a08be54.tar.gz git-4216329457926de0d977975fe9e3eef97a08be54.zip | |
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 'diffcore-rename.c')
| -rw-r--r-- | diffcore-rename.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 5a6e2bcac7..0e1adb87df 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -406,7 +406,7 @@ static const char *get_highest_rename_path(struct strintmap *counts) return highest_destination_dir; } -static char *UNKNOWN_DIR = "/"; /* placeholder -- short, illegal directory */ +static const char *UNKNOWN_DIR = "/"; /* placeholder -- short, illegal directory */ static int dir_rename_already_determinable(struct strintmap *counts) { @@ -429,8 +429,8 @@ static int dir_rename_already_determinable(struct strintmap *counts) } static void increment_count(struct dir_rename_info *info, - char *old_dir, - char *new_dir) + const char *old_dir, + const char *new_dir) { struct strintmap *counts; struct strmap_entry *e; |
