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/cgit.h | 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 12 insertions, 12 deletions
diff --git a/source/cgit.h b/source/cgit.h index 30f97c5..5b92632 100644 --- a/source/cgit.h +++ b/source/cgit.h @@ -84,7 +84,7 @@ struct cgit_repo { char *defbranch; char *module_link; struct string_list readme; - char *section; + const char *section; char *clone_url; char *logo; char *logo_link; @@ -166,7 +166,7 @@ struct cgit_query { int has_difftype; char *raw; char *repo; - char *page; + const char *page; char *search; char *grep; char *head; @@ -188,28 +188,28 @@ struct cgit_query { }; struct cgit_config { - char *agefile; - char *cache_root; + const char *agefile; + const char *cache_root; char *clone_prefix; char *clone_url; - char *favicon; + const char *favicon; char *footer; char *head_include; char *header; - char *logo; + const char *logo; char *logo_link; char *mimetype_file; char *module_link; char *project_list; struct string_list readme; struct string_list css; - char *robots; - char *root_title; - char *root_desc; + const char *robots; + const char *root_title; + const char *root_desc; char *root_readme; - char *script_name; - char *section; - char *repository_sort; + const char *script_name; + const char *section; + const char *repository_sort; // Always ends with a slash. char *virtual_root; char *strict_export; |
