summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-stripspace.c2
-rw-r--r--builtin.h1
-rw-r--r--commit.c9
-rw-r--r--commit.h2
-rw-r--r--diff.c4
-rw-r--r--diff.h2
-rw-r--r--quote.c14
-rw-r--r--quote.h2
-rw-r--r--upload-pack.c2
9 files changed, 6 insertions, 32 deletions
diff --git a/builtin-stripspace.c b/builtin-stripspace.c
index f0d4d9e2d1..62bd4b547b 100644
--- a/builtin-stripspace.c
+++ b/builtin-stripspace.c
@@ -26,7 +26,7 @@ static int cleanup(char *line)
return 1;
}
-void stripspace(FILE *in, FILE *out)
+static void stripspace(FILE *in, FILE *out)
{
int empties = -1;
int incomplete = 0;
diff --git a/builtin.h b/builtin.h
index fe8ba9e65f..da4834c312 100644
--- a/builtin.h
+++ b/builtin.h
@@ -7,7 +7,6 @@ extern const char git_version_string[];
extern const char git_usage_string[];
extern void help_unknown_cmd(const char *cmd);
-extern void stripspace(FILE *in, FILE *out);
extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
extern void prune_packed_objects(int);
diff --git a/commit.c b/commit.c
index 57b69ca7fa..4ca4d44ba0 100644
--- a/commit.c
+++ b/commit.c
@@ -1116,15 +1116,6 @@ struct commit *pop_commit(struct commit_list **stack)
return item;
}
-int count_parents(struct commit * commit)
-{
- int count;
- struct commit_list * parents = commit->parents;
- for (count = 0; parents; parents = parents->next,count++)
- ;
- return count;
-}
-
void topo_sort_default_setter(struct commit *c, void *data)
{
c->util = data;
diff --git a/commit.h b/commit.h
index 75b43a53ed..a313b53c31 100644
--- a/commit.h
+++ b/commit.h
@@ -73,8 +73,6 @@ struct commit *pop_commit(struct commit_list **stack);
void clear_commit_marks(struct commit *commit, unsigned int mark);
-int count_parents(struct commit * commit);
-
/*
* Performs an in-place topological sort of list supplied.
*
diff --git a/diff.c b/diff.c
index cafa7debeb..1d234d361d 100644
--- a/diff.c
+++ b/diff.c
@@ -2103,6 +2103,8 @@ static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *va
return 1;
}
+static int diff_scoreopt_parse(const char *opt);
+
int diff_opt_parse(struct diff_options *options, const char **av, int ac)
{
const char *arg = av[0];
@@ -2274,7 +2276,7 @@ static int parse_num(const char **cp_p)
return (int)((num >= scale) ? MAX_SCORE : (MAX_SCORE * num / scale));
}
-int diff_scoreopt_parse(const char *opt)
+static int diff_scoreopt_parse(const char *opt)
{
int opt1, opt2, cmd;
diff --git a/diff.h b/diff.h
index 63738c1dd4..a7ee6d8c87 100644
--- a/diff.h
+++ b/diff.h
@@ -155,8 +155,6 @@ extern void diff_unmerge(struct diff_options *,
unsigned mode,
const unsigned char *sha1);
-extern int diff_scoreopt_parse(const char *opt);
-
#define DIFF_SETUP_REVERSE 1
#define DIFF_SETUP_USE_CACHE 2
#define DIFF_SETUP_USE_SIZE_CACHE 4
diff --git a/quote.c b/quote.c
index fb9e4ca253..aa440098e1 100644
--- a/quote.c
+++ b/quote.c
@@ -20,7 +20,7 @@ static inline int need_bs_quote(char c)
return (c == '\'' || c == '!');
}
-size_t sq_quote_buf(char *dst, size_t n, const char *src)
+static size_t sq_quote_buf(char *dst, size_t n, const char *src)
{
char c;
char *bp = dst;
@@ -62,18 +62,6 @@ void sq_quote_print(FILE *stream, const char *src)
fputc('\'', stream);
}
-char *sq_quote(const char *src)
-{
- char *buf;
- size_t cnt;
-
- cnt = sq_quote_buf(NULL, 0, src) + 1;
- buf = xmalloc(cnt);
- sq_quote_buf(buf, cnt, src);
-
- return buf;
-}
-
char *sq_quote_argv(const char** argv, int count)
{
char *buf, *to;
diff --git a/quote.h b/quote.h
index bdc3610df5..8a59cc55d1 100644
--- a/quote.h
+++ b/quote.h
@@ -28,9 +28,7 @@
* excluding the final null regardless of the buffer size.
*/
-extern char *sq_quote(const char *src);
extern void sq_quote_print(FILE *stream, const char *src);
-extern size_t sq_quote_buf(char *dst, size_t n, const char *src);
extern char *sq_quote_argv(const char** argv, int count);
/*
diff --git a/upload-pack.c b/upload-pack.c
index 0e881c85b5..fe96ef15c4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -62,7 +62,7 @@ static ssize_t send_client_data(int fd, const char *data, ssize_t sz)
return safe_write(fd, data, sz);
}
-FILE *pack_pipe = NULL;
+static FILE *pack_pipe = NULL;
static void show_commit(struct commit *commit)
{
if (commit->object.flags & BOUNDARY)