diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Keep string literals behind const pointers
Git's DEVELOPER=1 build turns on -Wwrite-strings as an error, and the
literals stored through plain char pointers failed cgit's own objects
there. The exec filter's argv takes the cast execvp needs once, the
way git's run-command does.
Diffstat (limited to '')
| -rw-r--r-- | source/ui-diff.c | 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 2 insertions, 2 deletions
diff --git a/source/ui-diff.c b/source/ui-diff.c index a5202b5..805733a 100644 --- a/source/ui-diff.c +++ b/source/ui-diff.c @@ -227,8 +227,8 @@ static char *abbrev_oid(const struct object_id *oid) return xstrdup(repo_find_unique_abbrev(the_repository, oid, DEFAULT_ABBREV)); } -static void print_file_header(const struct object_id *old_oid, char *old_path, unsigned old_mode, - const struct object_id *new_oid, char *new_path, unsigned new_mode) +static void print_file_header(const struct object_id *old_oid, const char *old_path, unsigned old_mode, + const struct object_id *new_oid, const char *new_path, unsigned new_mode) { char *old_abbrev, *new_abbrev; int subproject; |
