Skip to content

Commit

Permalink
[PATCH] Fix sparse warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Aug 1, 2005
1 parent 9b75e9f commit 4d8fa91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions daemon.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion rev-cache.c
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion server-info.c
Expand Up @@ -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;
Expand Down

0 comments on commit 4d8fa91

Please sign in to comment.