Fix sparse warnings.

Mainly making a lot of local functions and variables be marked "static",
but there was a "zero as NULL" warning in there too.
diff --git a/apply.c b/apply.c
index c81b0a2..701c01a 100644
--- a/apply.c
+++ b/apply.c
@@ -724,8 +724,8 @@
 	return offset + hdrsize + patchsize;
 }
 
-const char pluses[] = "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
-const char minuses[]= "----------------------------------------------------------------------";
+static const char pluses[] = "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
+static const char minuses[]= "----------------------------------------------------------------------";
 
 static void show_stats(struct patch *patch)
 {
diff --git a/cvs2git.c b/cvs2git.c
index ab05908..8c50e67 100644
--- a/cvs2git.c
+++ b/cvs2git.c
@@ -206,7 +206,7 @@
 	printf("git-update-cache --add -- '%s'\n", name);
 }
 
-struct hdrentry {
+static struct hdrentry {
 	const char *name;
 	char *dest;
 } hdrs[] = {
diff --git a/epoch.c b/epoch.c
index 3cbff72..6dbcfb3 100644
--- a/epoch.c
+++ b/epoch.c
@@ -28,7 +28,7 @@
 static struct fraction *one = NULL;
 static struct fraction *zero = NULL;
 
-static BN_CTX *get_BN_CTX()
+static BN_CTX *get_BN_CTX(void)
 {
 	if (!context) {
 		context = BN_CTX_new();
@@ -36,7 +36,7 @@
 	return context;
 }
 
-static struct fraction *new_zero()
+static struct fraction *new_zero(void)
 {
 	struct fraction *result = xmalloc(sizeof(*result));
 	BN_init(&result->numerator);
@@ -75,7 +75,7 @@
 	return fraction;
 }
 
-static struct fraction *get_one()
+static struct fraction *get_one(void)
 {
 	if (!one) {
 		one = new_zero();
@@ -84,7 +84,7 @@
 	return one;
 }
 
-static struct fraction *get_zero()
+static struct fraction *get_zero(void)
 {
 	if (!zero) {
 		zero = new_zero();
diff --git a/ls-tree.c b/ls-tree.c
index 450bff2..8d524b8 100644
--- a/ls-tree.c
+++ b/ls-tree.c
@@ -79,7 +79,7 @@
 		slash = strchr(path, '/');
 		if (!slash) {
 			len = strlen(path);
-			next = 0;
+			next = NULL;
 		}
 		else {
 			next = slash + 1;
diff --git a/receive-pack.c b/receive-pack.c
index d05f7d5..dfa7cd1 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -25,7 +25,7 @@
 	char ref_name[0];
 };
 
-struct command *commands = NULL;
+static struct command *commands = NULL;
 
 static int is_all_zeroes(const char *hex)
 {
diff --git a/rev-list.c b/rev-list.c
index 362342e..fb75c22 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -310,7 +310,7 @@
 	return best;
 }
 
-struct commit_list *limit_list(struct commit_list *list)
+static struct commit_list *limit_list(struct commit_list *list)
 {
 	struct commit_list *newlist = NULL;
 	struct commit_list **p = &newlist;
diff --git a/sha1_file.c b/sha1_file.c
index a4ed4f9..b18e467 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -531,7 +531,7 @@
 	return inflate(stream, 0);
 }
 
-void *unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size)
+static void *unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size)
 {
 	int bytes = strlen(buffer) + 1;
 	unsigned char *buf = xmalloc(1+size);
diff --git a/ssh-pull.c b/ssh-pull.c
index 87d5238..26356dd 100644
--- a/ssh-pull.c
+++ b/ssh-pull.c
@@ -29,7 +29,7 @@
 	return ret;
 }
 
-int get_version(void)
+static int get_version(void)
 {
 	char type = 'v';
 	write(fd_out, &type, 1);
diff --git a/ssh-push.c b/ssh-push.c
index db69c88..090d6f9 100644
--- a/ssh-push.c
+++ b/ssh-push.c
@@ -4,10 +4,10 @@
 
 #include <string.h>
 
-unsigned char local_version = 1;
-unsigned char remote_version = 0;
+static unsigned char local_version = 1;
+static unsigned char remote_version = 0;
 
-int serve_object(int fd_in, int fd_out) {
+static int serve_object(int fd_in, int fd_out) {
 	ssize_t size;
 	int posn = 0;
 	unsigned char sha1[20];
@@ -57,7 +57,7 @@
 	return 0;
 }
 
-int serve_version(int fd_in, int fd_out)
+static int serve_version(int fd_in, int fd_out)
 {
 	if (read(fd_in, &remote_version, 1) < 1)
 		return -1;
@@ -65,7 +65,7 @@
 	return 0;
 }
 
-int serve_ref(int fd_in, int fd_out)
+static int serve_ref(int fd_in, int fd_out)
 {
 	char ref[PATH_MAX];
 	unsigned char sha1[20];
@@ -86,7 +86,7 @@
 }
 
 
-void service(int fd_in, int fd_out) {
+static void service(int fd_in, int fd_out) {
 	char type;
 	int retval;
 	do {