]> git.ipfire.org Git - thirdparty/git.git/commitdiff
[PATCH] Fix sparse warnings
authorLinus Torvalds <torvalds@osdl.org>
Mon, 1 Aug 2005 19:11:53 +0000 (12:11 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 1 Aug 2005 20:28:58 +0000 (13:28 -0700)
A few sparse warnings have crept in again since I checked last time:
undeclared variables with global scope.

Fix them by marking the private variables properly "static".

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
daemon.c
rev-cache.c
server-info.c

index eeff9e7b05fc9e84f8fef06a5322f9fbb3ec9eb2..b7d60918ebab7816d8711b927aeae7dfab32fd2e 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -71,13 +71,13 @@ static int max_connections = 25;
 
 /* These are updated by the signal handler */
 static volatile unsigned int children_reaped = 0;
-pid_t dead_child[MAX_CHILDREN];
+static pid_t dead_child[MAX_CHILDREN];
 
 /* These are updated by the main loop */
 static unsigned int children_spawned = 0;
 static unsigned int children_deleted = 0;
 
-struct child {
+static struct child {
        pid_t pid;
        socklen_t addrlen;
        struct sockaddr_storage address;
index f908ce7a3a9883f7c10e17c19438995abc1dcfef..6344d62247483bb8f245d9b707b2dedfa42b293b 100644 (file)
@@ -5,7 +5,7 @@
 struct rev_cache **rev_cache;
 int nr_revs, alloc_revs;
 
-struct rev_list_elem *rle_free;
+static struct rev_list_elem *rle_free;
 
 #define BATCH_SIZE 512
 
index 3dd201afb97db5233835ce44f856d5750f6a10cd..2b3aecab4aa0df4125f401219f06ea04577cacca 100644 (file)
@@ -62,7 +62,7 @@ static int update_info_refs(int force)
 }
 
 /* packs */
-struct pack_info {
+static struct pack_info {
        unsigned long latest;
        struct packed_git *p;
        int old_num;