summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorLibravatar Brandon Casey <casey@nrlssc.navy.mil>2009-07-10 12:10:43 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-07-10 23:50:29 -0700
commit0039ba7e5e630502be9ac601845b214abce93750 (patch)
tree8e01cb139c766643f18e296c21e688b03621bc8c /unpack-trees.c
parentMerge branch 'lt/dir-cleanup' (diff)
downloadtgif-0039ba7e5e630502be9ac601845b214abce93750.tar.xz
unpack-trees.c: work around run-time array initialization flaw on IRIX 6.5
The c99 MIPSpro Compiler version 7.4.4m on IRIX 6.5 does not properly initialize run-time initialized arrays. An array which is initialized with fewer elements than the length of the array should have the unitialized elements initialized to zero. This compiler only initializes the remaining elements when the last element is a static parameter. So work around it by adding a "NULL" initialization parameter. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 42c7d7d563..f9d12aafba 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -128,7 +128,7 @@ static inline int call_unpack_fn(struct cache_entry **src, struct unpack_trees_o
static int unpack_index_entry(struct cache_entry *ce, struct unpack_trees_options *o)
{
- struct cache_entry *src[5] = { ce, };
+ struct cache_entry *src[5] = { ce, NULL, };
o->pos++;
if (ce_stage(ce)) {