mirror of
https://git.zx2c4.com/cgit
synced 2025-06-24 10:48:44 +02:00
Mark several functions/variables static
Spotted by parsing the output of `gcc -Wmissing-prototypes [...]`. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
This commit is contained in:
parent
d5a43b429a
commit
bafab423f2
14 changed files with 64 additions and 60 deletions
12
shared.c
12
shared.c
|
@ -158,7 +158,7 @@ void cgit_add_ref(struct reflist *list, struct refinfo *ref)
|
|||
list->refs[list->count++] = ref;
|
||||
}
|
||||
|
||||
struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1)
|
||||
static struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1)
|
||||
{
|
||||
struct refinfo *ref;
|
||||
|
||||
|
@ -187,8 +187,8 @@ int cgit_refs_cb(const char *refname, const unsigned char *sha1, int flags,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void cgit_diff_tree_cb(struct diff_queue_struct *q,
|
||||
struct diff_options *options, void *data)
|
||||
static void cgit_diff_tree_cb(struct diff_queue_struct *q,
|
||||
struct diff_options *options, void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -224,7 +224,7 @@ static int load_mmfile(mmfile_t *file, const unsigned char *sha1)
|
|||
char *diffbuf = NULL;
|
||||
int buflen = 0;
|
||||
|
||||
int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf)
|
||||
static int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -461,14 +461,14 @@ int readfile(const char *path, char **buf, size_t *size)
|
|||
return (*size == st.st_size ? 0 : e);
|
||||
}
|
||||
|
||||
int is_token_char(char c)
|
||||
static int is_token_char(char c)
|
||||
{
|
||||
return isalnum(c) || c == '_';
|
||||
}
|
||||
|
||||
/* Replace name with getenv(name), return pointer to zero-terminating char
|
||||
*/
|
||||
char *expand_macro(char *name, int maxlength)
|
||||
static char *expand_macro(char *name, int maxlength)
|
||||
{
|
||||
char *value;
|
||||
int len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue