]> Kevux Git Server - fll/commitdiff
Cleanup: Remove unused variables, remove double declared variable, and add missing...
authorKevin Day <kevin@kevux.org>
Mon, 17 Apr 2023 02:58:30 +0000 (21:58 -0500)
committerKevin Day <kevin@kevux.org>
Mon, 17 Apr 2023 02:58:30 +0000 (21:58 -0500)
level_3/fake/c/main/common.c
level_3/fake/c/main/make/operate.c
level_3/fake/c/main/make/operate_process_type.c
level_3/fake/c/main/print/error.c
level_3/fake/c/main/print/verbose.c

index 7ac247cf9e392ecae6b3a8166700cfc3d9159c13..de56b30a6cb85972af817b0cc80f95a5b8605f1c 100644 (file)
@@ -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;
index 6eeff4cc95c5accb72926c374cd516dd6b329641..9814475343671ae130011cde5a156e7deb2a4aac 100644 (file)
@@ -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, &section_stack);
+                result = fake_make_operate_section(&data_make, j, &section_stack);
 
                 if (main->setting.state.status == F_child) {
                   main->program.child = result;
index 5733db8a60e10ac2b2488e9cfe9e8a7c6d95a45a..9e3f93bab707f64af2cf50becb3525f726342551 100644 (file)
@@ -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.
index 3a8160936168d590b4905ec4097596295934b0a8..97d3a1d86b7e76fe1d822beb71f6f54ec9e6eaf9 100644 (file)
@@ -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);
index 9424560bb73d57679b15011402968f49153c9744..27efb0b6901e4d1ad25b216ed21d6a83868b74f8 100644 (file)
@@ -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_