summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10d781b)
raw | patch | inline | side by side (parent: 10d781b)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 29 Aug 2005 19:41:03 +0000 (12:41 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 29 Aug 2005 19:41:03 +0000 (12:41 -0700) |
This reverts 6c5f9baa3bc0d63e141e0afc23110205379905a4 commit, whose
change breaks gcc-2.95.
Not that I ignore portability to compilers that are properly C99, but
keeping compilation with GCC working is more important, at least for
now. We would probably end up declaring with "name[1]" and teach the
allocator to subtract one if we really aimed for portability, but that
is left for later rounds.
Signed-off-by: Junio C Hamano <junkio@cox.net>
change breaks gcc-2.95.
Not that I ignore portability to compilers that are properly C99, but
keeping compilation with GCC working is more important, at least for
now. We would probably end up declaring with "name[1]" and teach the
allocator to subtract one if we really aimed for portability, but that
is left for later rounds.
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
commit.c | patch | blob | history | |
ls-files.c | patch | blob | history | |
receive-pack.c | patch | blob | history | |
server-info.c | patch | blob | history |
index d407f390010c8db7c9e469675bbd7f5a8ece1fa2..0dcd2fe53b6aa7b19d963e130ce5fd4dea2389bc 100644 (file)
--- a/cache.h
+++ b/cache.h
unsigned int ce_size;
unsigned char sha1[20];
unsigned short ce_flags;
- char name[];
+ char name[0];
};
#define CE_NAMEMASK (0x0fff)
extern struct alternate_object_database {
struct alternate_object_database *next;
char *name;
- char base[]; /* more */
+ char base[0]; /* more */
} *alt_odb_list;
extern void prepare_alt_odb(void);
unsigned int pack_last_used;
unsigned int pack_use_cnt;
unsigned char sha1[20];
- char pack_name[]; /* something like ".git/objects/pack/xxxxx.pack" */
+ char pack_name[0]; /* something like ".git/objects/pack/xxxxx.pack" */
} *packed_git;
struct pack_entry {
unsigned char new_sha1[20];
unsigned char force;
struct ref *peer_ref; /* when renaming */
- char name[];
+ char name[0];
};
extern int git_connect(int fd[2], char *url, const char *prog);
diff --git a/commit.c b/commit.c
index 56192587afa7454e5db8c5ac3e4a937c1f0694ea..e51eda15243614d83948f31ee3814120ad61b1fe 100644 (file)
--- a/commit.c
+++ b/commit.c
static struct commit_graft {
unsigned char sha1[20];
int nr_parent;
- unsigned char parent[][20]; /* more */
+ unsigned char parent[0][20]; /* more */
} **commit_graft;
static int commit_graft_alloc, commit_graft_nr;
diff --git a/ls-files.c b/ls-files.c
index 0d79104e0dd16c77c10a7db43c1afce3fc733160..e53d245884ab14f85824fd6c1b891481c8b1f849 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
struct nond_on_fs {
int len;
- char name[];
+ char name[0];
};
static struct nond_on_fs **dir;
diff --git a/receive-pack.c b/receive-pack.c
index 1ef0c13935751903efc5c2dee738604a80b75de2..06857eb77fef93788f54d17cca68924f5213c9db 100644 (file)
--- a/receive-pack.c
+++ b/receive-pack.c
unsigned char updated;
unsigned char old_sha1[20];
unsigned char new_sha1[20];
- char ref_name[];
+ char ref_name[0];
};
static struct command *commands = NULL;
diff --git a/server-info.c b/server-info.c
index cb58eb607e4a3a3f24862bc701e86adfb06fb45b..2b3aecab4aa0df4125f401219f06ea04577cacca 100644 (file)
--- a/server-info.c
+++ b/server-info.c
int nr_alloc;
int nr_heads;
unsigned char (*head)[20];
- char dep[]; /* more */
+ char dep[0]; /* more */
} **info;
static int num_pack;
static const char *objdir;