From: Kevin Day Date: Sat, 26 Jun 2021 04:33:22 +0000 (-0500) Subject: Regression: The 'defines_all' build settings is not being processed. X-Git-Tag: 0.5.4~2 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a6ce393bd66fe7ae38069cdfd7e5a7e36823923d;p=fll Regression: The 'defines_all' build settings is not being processed. The commit 6cc315f7a41957fe610baa11460a0985184fd5d3 introduced this regression. During the cleanup of the code structure, I missed initialized i = 0 in the for loop that handles 'defines_all'. I also noticed and fixed redundant error status checks. --- diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 0a94f18..561b02a 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -97,81 +97,57 @@ extern "C" { f_array_length_t i = 0; - if (F_status_is_error_not(*status)) { - for (i = 0; i < data_build.setting.build_libraries.used; ++i) { - - *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i].string, data_build.setting.build_libraries.array[i].used, arguments); - if (F_status_is_error(*status)) break; - } // for - } + for (i = 0; i < data_build.setting.build_libraries.used && F_status_is_error_not(*status); ++i) { + *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i].string, data_build.setting.build_libraries.array[i].used, arguments); + } // for for (i = 0; i < data_build.setting.flags_all.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.flags_all.array[i].string, data_build.setting.flags_all.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for for (i = 0; i < data_build.setting.flags_shared.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i].string, data_build.setting.flags_shared.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for if (is_library) { for (i = 0; i < data_build.setting.flags_library.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.flags_library.array[i].string, data_build.setting.flags_library.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } else { for (i = 0; i < data_build.setting.flags_program.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.flags_program.array[i].string, data_build.setting.flags_program.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } - for (; i < data_build.setting.defines_all.used && F_status_is_error_not(*status); ++i) { - + for (i = 0; i < data_build.setting.defines_all.used && F_status_is_error_not(*status); ++i) { *status = fll_execute_arguments_add(data_build.setting.defines_all.array[i].string, data_build.setting.defines_all.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for if (is_shared) { for (i = 0; i < data_build.setting.defines_shared.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.defines_shared.array[i].string, data_build.setting.defines_shared.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } else { for (i = 0; i < data_build.setting.defines_static.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.defines_static.array[i].string, data_build.setting.defines_static.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } if (is_library) { for (i = 0; i < data_build.setting.defines_library.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.defines_library.array[i].string, data_build.setting.defines_library.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } else { for (i = 0; i < data_build.setting.defines_program.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(data_build.setting.defines_program.array[i].string, data_build.setting.defines_program.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } for (i = 0; i < main.define.used && F_status_is_error_not(*status); ++i) { - *status = fll_execute_arguments_add(main.define.array[i].string, main.define.array[i].used, arguments); - if (F_status_is_error(*status)) break; } // for } #endif // _di_fake_build_arguments_standard_add_