summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b75e9f)
raw | patch | inline | side by side (parent: 9b75e9f)
author | Linus Torvalds <torvalds@osdl.org> | |
Mon, 1 Aug 2005 19:11:53 +0000 (12:11 -0700) | ||
committer | Junio 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>
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 | patch | blob | history | |
rev-cache.c | patch | blob | history | |
server-info.c | patch | blob | history |
diff --git a/daemon.c b/daemon.c
index eeff9e7b05fc9e84f8fef06a5322f9fbb3ec9eb2..b7d60918ebab7816d8711b927aeae7dfab32fd2e 100644 (file)
--- a/daemon.c
+++ b/daemon.c
/* 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;
diff --git a/rev-cache.c b/rev-cache.c
index f908ce7a3a9883f7c10e17c19438995abc1dcfef..6344d62247483bb8f245d9b707b2dedfa42b293b 100644 (file)
--- a/rev-cache.c
+++ b/rev-cache.c
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
diff --git a/server-info.c b/server-info.c
index 3dd201afb97db5233835ce44f856d5750f6a10cd..2b3aecab4aa0df4125f401219f06ea04577cacca 100644 (file)
--- a/server-info.c
+++ b/server-info.c
}
/* packs */
-struct pack_info {
+static struct pack_info {
unsigned long latest;
struct packed_git *p;
int old_num;