Rewrite dynamic structure initializations to runtime assignment
Unfortunately, there are still plenty of production systems with vendor compilers that choke unless all compound declarations can be determined statically at compile time, for example hpux10.20 (I can provide a comprehensive list of our supported platforms that exhibit this problem if necessary). This patch simply breaks apart any compound declarations with dynamic initialisation expressions, and moves the initialisation until after the last declaration in the same block, in all the places necessary to have the offending compilers accept the code. Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ebef827765
commit
66dbfd55e3
@ -287,9 +287,11 @@ static void add_same_unmerged(struct cache_entry *ce,
|
||||
static int unpack_index_entry(struct cache_entry *ce,
|
||||
struct unpack_trees_options *o)
|
||||
{
|
||||
struct cache_entry *src[5] = { ce, NULL, };
|
||||
struct cache_entry *src[5] = { NULL };
|
||||
int ret;
|
||||
|
||||
src[0] = ce;
|
||||
|
||||
mark_ce_used(ce, o);
|
||||
if (ce_stage(ce)) {
|
||||
if (o->skip_unmerged) {
|
||||
|
||||
Reference in New Issue
Block a user