diff options
| author | 2013-03-04 16:52:33 (JST) | |
|---|---|---|
| committer | 2013-03-05 09:50:39 (JST) | |
| commit | bafab423f20bc1448b293842c235965e1681f07e (patch) | |
| tree | 18c4bef1e4714c4abd20b8e1d5ec04db3ae3b9ac /cgit.c | |
| parent | d5a43b429a4248a02e3a403f76fff0cbae92ef32 (diff) | |
| download | cgit-bafab423f20bc1448b293842c235965e1681f07e.zip cgit-bafab423f20bc1448b293842c235965e1681f07e.tar.gz | |
Mark several functions/variables static
Spotted by parsing the output of `gcc -Wmissing-prototypes [...]`.
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to 'cgit.c')
| -rw-r--r-- | cgit.c | 26 |
1 files changed, 13 insertions, 13 deletions
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | const char *cgit_version = CGIT_VERSION; | 19 | const char *cgit_version = CGIT_VERSION; |
| 20 | 20 | ||
| 21 | void add_mimetype(const char *name, const char *value) | 21 | static void add_mimetype(const char *name, const char *value) |
| 22 | { | 22 | { |
| 23 | struct string_list_item *item; | 23 | struct string_list_item *item; |
| 24 | 24 | ||
| @@ -26,7 +26,7 @@ void add_mimetype(const char *name, const char *value) | |||
| 26 | item->util = xstrdup(value); | 26 | item->util = xstrdup(value); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) | 29 | static struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) |
| 30 | { | 30 | { |
| 31 | struct cgit_filter *f; | 31 | struct cgit_filter *f; |
| 32 | int args_size = 0; | 32 | int args_size = 0; |
| @@ -58,7 +58,7 @@ struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) | |||
| 58 | 58 | ||
| 59 | static void process_cached_repolist(const char *path); | 59 | static void process_cached_repolist(const char *path); |
| 60 | 60 | ||
| 61 | void repo_config(struct cgit_repo *repo, const char *name, const char *value) | 61 | static void repo_config(struct cgit_repo *repo, const char *name, const char *value) |
| 62 | { | 62 | { |
| 63 | struct string_list_item *item; | 63 | struct string_list_item *item; |
| 64 | 64 | ||
| @@ -114,7 +114,7 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void config_cb(const char *name, const char *value) | 117 | static void config_cb(const char *name, const char *value) |
| 118 | { | 118 | { |
| 119 | if (!strcmp(name, "section") || !strcmp(name, "repo.group")) | 119 | if (!strcmp(name, "section") || !strcmp(name, "repo.group")) |
| 120 | ctx.cfg.section = xstrdup(value); | 120 | ctx.cfg.section = xstrdup(value); |
| @@ -333,7 +333,7 @@ static void querystring_cb(const char *name, const char *value) | |||
| 333 | } | 333 | } |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | char *xstrdupn(const char *str) | 336 | static char *xstrdupn(const char *str) |
| 337 | { | 337 | { |
| 338 | return (str ? xstrdup(str) : NULL); | 338 | return (str ? xstrdup(str) : NULL); |
| 339 | } | 339 | } |
| @@ -414,8 +414,8 @@ struct refmatch { | |||
| 414 | int match; | 414 | int match; |
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | int find_current_ref(const char *refname, const unsigned char *sha1, | 417 | static int find_current_ref(const char *refname, const unsigned char *sha1, |
| 418 | int flags, void *cb_data) | 418 | int flags, void *cb_data) |
| 419 | { | 419 | { |
| 420 | struct refmatch *info; | 420 | struct refmatch *info; |
| 421 | 421 | ||
| @@ -427,7 +427,7 @@ int find_current_ref(const char *refname, const unsigned char *sha1, | |||
| 427 | return info->match; | 427 | return info->match; |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | char *find_default_branch(struct cgit_repo *repo) | 430 | static char *find_default_branch(struct cgit_repo *repo) |
| 431 | { | 431 | { |
| 432 | struct refmatch info; | 432 | struct refmatch info; |
| 433 | char *ref; | 433 | char *ref; |
| @@ -569,13 +569,13 @@ static void process_request(void *cbdata) | |||
| 569 | cgit_print_docend(); | 569 | cgit_print_docend(); |
| 570 | } | 570 | } |
| 571 | 571 | ||
| 572 | int cmp_repos(const void *a, const void *b) | 572 | static int cmp_repos(const void *a, const void *b) |
| 573 | { | 573 | { |
| 574 | const struct cgit_repo *ra = a, *rb = b; | 574 | const struct cgit_repo *ra = a, *rb = b; |
| 575 | return strcmp(ra->url, rb->url); | 575 | return strcmp(ra->url, rb->url); |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | char *build_snapshot_setting(int bitmap) | 578 | static char *build_snapshot_setting(int bitmap) |
| 579 | { | 579 | { |
| 580 | const struct cgit_snapshot_format *f; | 580 | const struct cgit_snapshot_format *f; |
| 581 | char *result = xstrdup(""); | 581 | char *result = xstrdup(""); |
| @@ -595,7 +595,7 @@ char *build_snapshot_setting(int bitmap) | |||
| 595 | return result; | 595 | return result; |
| 596 | } | 596 | } |
| 597 | 597 | ||
| 598 | char *get_first_line(char *txt) | 598 | static char *get_first_line(char *txt) |
| 599 | { | 599 | { |
| 600 | char *t = xstrdup(txt); | 600 | char *t = xstrdup(txt); |
| 601 | char *p = strchr(t, '\n'); | 601 | char *p = strchr(t, '\n'); |
| @@ -604,7 +604,7 @@ char *get_first_line(char *txt) | |||
| 604 | return t; | 604 | return t; |
| 605 | } | 605 | } |
| 606 | 606 | ||
| 607 | void print_repo(FILE *f, struct cgit_repo *repo) | 607 | static void print_repo(FILE *f, struct cgit_repo *repo) |
| 608 | { | 608 | { |
| 609 | fprintf(f, "repo.url=%s\n", repo->url); | 609 | fprintf(f, "repo.url=%s\n", repo->url); |
| 610 | fprintf(f, "repo.name=%s\n", repo->name); | 610 | fprintf(f, "repo.name=%s\n", repo->name); |
| @@ -649,7 +649,7 @@ void print_repo(FILE *f, struct cgit_repo *repo) | |||
| 649 | fprintf(f, "\n"); | 649 | fprintf(f, "\n"); |
| 650 | } | 650 | } |
| 651 | 651 | ||
| 652 | void print_repolist(FILE *f, struct cgit_repolist *list, int start) | 652 | static void print_repolist(FILE *f, struct cgit_repolist *list, int start) |
| 653 | { | 653 | { |
| 654 | int i; | 654 | int i; |
| 655 | 655 | ||
