From 66dbfd55e38128db02eb340fcd89f54b734d4c6e Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Fri, 14 May 2010 09:31:33 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- refs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'refs.c') diff --git a/refs.c b/refs.c index d3db15a76c..a7ad3fd8fa 100644 --- a/refs.c +++ b/refs.c @@ -314,7 +314,11 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname) { - struct warn_if_dangling_data data = { fp, refname, msg_fmt }; + struct warn_if_dangling_data data; + + data.fp = fp; + data.refname = refname; + data.msg_fmt = msg_fmt; for_each_rawref(warn_if_dangling_symref, &data); } -- cgit v1.2.3