From: Kevin Day Date: Mon, 17 Apr 2023 02:58:30 +0000 (-0500) Subject: Cleanup: Remove unused variables, remove double declared variable, and add missing... X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=82689bbec8c431883389c198631763f1c44c9580;p=fll Cleanup: Remove unused variables, remove double declared variable, and add missing return statements. --- diff --git a/level_3/fake/c/main/common.c b/level_3/fake/c/main/common.c index 7ac247c..de56b30 100644 --- a/level_3/fake/c/main/common.c +++ b/level_3/fake/c/main/common.c @@ -51,7 +51,6 @@ extern "C" { } { - f_array_length_t choice = 0; f_uint16s_t choices = f_uint16s_t_initialize; // Identify and prioritize "color context" parameters. @@ -487,7 +486,6 @@ extern "C" { return; } - f_console_parameters_t * const parameters = (f_console_parameters_t * const) void_parameters; fake_data_t * const data = (fake_data_t * const) void_data; if (!data->main) return; diff --git a/level_3/fake/c/main/make/operate.c b/level_3/fake/c/main/make/operate.c index 6eeff4c..9814475 100644 --- a/level_3/fake/c/main/make/operate.c +++ b/level_3/fake/c/main/make/operate.c @@ -146,7 +146,7 @@ extern "C" { if (f_compare_dynamic_partial(main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) { { - int result = fake_make_operate_section(&data_make, j, §ion_stack); + result = fake_make_operate_section(&data_make, j, §ion_stack); if (main->setting.state.status == F_child) { main->program.child = result; diff --git a/level_3/fake/c/main/make/operate_process_type.c b/level_3/fake/c/main/make/operate_process_type.c index 5733db8..9e3f93b 100644 --- a/level_3/fake/c/main/make/operate_process_type.c +++ b/level_3/fake/c/main/make/operate_process_type.c @@ -332,7 +332,7 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - fake_print_error_file(&main->program.error, *function, main->cache_arguments.array[1], *operation, fll_error_file_type_path_e); + fake_print_error_file(&main->program.error, *function, main->cache_arguments.array[1], *operation, type); main->setting.state.status = F_status_set_error(F_failure); } @@ -1486,8 +1486,6 @@ extern "C" { const f_array_length_t total = main->cache_arguments.used - 1; - f_string_static_t destination = f_string_static_t_initialize; - bool existing = F_true; // In this case, the destination could be a file, so confirm this. diff --git a/level_3/fake/c/main/print/error.c b/level_3/fake/c/main/print/error.c index 3a81609..97d3a1d 100644 --- a/level_3/fake/c/main/print/error.c +++ b/level_3/fake/c/main/print/error.c @@ -458,7 +458,6 @@ extern "C" { fake_main_t * const main = (fake_main_t *) print->custom; f_array_length_t line = 1; - f_state_t state = f_state_t_initialize; const f_status_t status = main->setting.state.status; f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state); @@ -587,7 +586,6 @@ extern "C" { fake_main_t * const main = (fake_main_t *) print->custom; f_array_length_t line = 1; - f_state_t state = f_state_t_initialize; const f_status_t status = main->setting.state.status; f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state); @@ -621,7 +619,6 @@ extern "C" { fake_main_t * const main = (fake_main_t *) print->custom; f_array_length_t line = 1; - f_state_t state = f_state_t_initialize; const f_status_t status = main->setting.state.status; f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state); diff --git a/level_3/fake/c/main/print/verbose.c b/level_3/fake/c/main/print/verbose.c index 9424560..27efb0b 100644 --- a/level_3/fake/c/main/print/verbose.c +++ b/level_3/fake/c/main/print/verbose.c @@ -69,6 +69,8 @@ extern "C" { if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; fake_print_common_wrapped_variable(print, "File ", path, " already exists"); + + return F_none; } #endif // _di_fake_print_verbose_file_exists_ @@ -79,6 +81,8 @@ extern "C" { if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; fake_print_common_wrapped_variable(print, "File ", path, " already exists (as a symbolic link)"); + + return F_none; } #endif // _di_fake_print_verbose_file_exists_as_link_ @@ -89,6 +93,8 @@ extern "C" { if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; fake_print_common_wrapped_variable(print, "File ", path, " already exists but is not a regular file (or a symbolic link)"); + + return F_none; } #endif // _di_fake_print_verbose_file_exists_not_regular_or_link_ @@ -99,6 +105,8 @@ extern "C" { if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not; fake_print_common_simple_variable(print, "Pre-populated file ", path); + + return F_none; } #endif // _di_fake_print_verbose_file_pre_populated_