summaryrefslogtreecommitdiff
path: root/shared.c
diff options
context:
space:
mode:
authorLukas Fleischer <cgit@cryptocrack.de>2013-03-04 07:52:33 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2013-03-05 00:50:39 +0000
commitbafab423f20bc1448b293842c235965e1681f07e (patch)
tree18c4bef1e4714c4abd20b8e1d5ec04db3ae3b9ac /shared.c
parentd5a43b429a4248a02e3a403f76fff0cbae92ef32 (diff)
downloadcgit-bafab423f20bc1448b293842c235965e1681f07e.tar
cgit-bafab423f20bc1448b293842c235965e1681f07e.tar.gz
cgit-bafab423f20bc1448b293842c235965e1681f07e.zip
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 'shared.c')
-rw-r--r--shared.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared.c b/shared.c
index e732064..124d079 100644
--- a/shared.c
+++ b/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;