commit 7a52a8bcab46bbdee77445b05e844f903ff1fbcd from: Stefan Sperling date: Thu Nov 03 13:12:59 2022 UTC remove casts which make older gcc versions unhappy ../lib/diffreg.c:44: error: initializer element is not constant ../lib/diffreg.c:51: error: initializer element is not constant ../lib/diffreg.c:59: error: initializer element is not constant ../lib/diffreg.c:66: error: initializer element is not constant reported by Red on Libera IRC, and by sthen@ who pointed out such failures appearing in landry's sparc64 bulk build logs. commit - e3ad2c64b43c0605f74ebc24145802474a047c70 commit + 7a52a8bcab46bbdee77445b05e844f903ff1fbcd blob - 154e8609c89ab357a787c3bfc9b14426c2dd2c2f blob + f40a6d4c36c3cc615dab722e0d43353056e5ccc5 --- lib/diffreg.c +++ lib/diffreg.c @@ -37,20 +37,19 @@ const struct diff_algo_config myers_then_myers_divide; const struct diff_algo_config patience; const struct diff_algo_config myers_divide; -const struct diff_algo_config myers_then_patience = (struct diff_algo_config){ +const struct diff_algo_config myers_then_patience = { .impl = diff_algo_myers, .permitted_state_size = 1024 * 1024 * sizeof(int), .fallback_algo = &patience, }; -const struct diff_algo_config myers_then_myers_divide = - (struct diff_algo_config){ +const struct diff_algo_config myers_then_myers_divide = { .impl = diff_algo_myers, .permitted_state_size = 1024 * 1024 * sizeof(int), .fallback_algo = &myers_divide, }; -const struct diff_algo_config patience = (struct diff_algo_config){ +const struct diff_algo_config patience = { .impl = diff_algo_patience, /* After subdivision, do Patience again: */ .inner_algo = &patience, @@ -58,7 +57,7 @@ const struct diff_algo_config patience = (struct diff_ .fallback_algo = &myers_then_myers_divide, }; -const struct diff_algo_config myers_divide = (struct diff_algo_config){ +const struct diff_algo_config myers_divide = { .impl = diff_algo_myers_divide, /* When division succeeded, start from the top: */ .inner_algo = &myers_then_myers_divide,