commit db97f624e0d3f6f3e57fdb7961da1b61bb6baad1 from: Stefan Sperling via: Thomas Adam date: Thu Nov 03 22:16:57 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 - 4ea11ec7029e366447b11f65f43410dcacf235d7 commit + db97f624e0d3f6f3e57fdb7961da1b61bb6baad1 blob - 436d6324526303de8e250a42a3bbdfe62e71ca58 blob + f024469b941b3c0d551b8050cdb33fe296707d8f --- lib/diffreg.c +++ lib/diffreg.c @@ -38,20 +38,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, @@ -59,7 +58,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,