From d17a289e9835fe04b79f1957b3d513b519ab307c Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 27 Sep 2026 19:07:17 -1000 Subject: 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. --- source/ui-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/ui-diff.c') 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; -- cgit 2.12.1