]> Kevux Git Server - fll/commitdiff
Cleanup: Make the error messages with fallback warning messages.
authorKevin Day <kevin@kevux.org>
Fri, 24 Feb 2023 02:23:47 +0000 (20:23 -0600)
committerKevin Day <kevin@kevux.org>
Fri, 24 Feb 2023 02:24:48 +0000 (20:24 -0600)
Follow up the previous commit (4d7d66565a555baf9d7df72255c1063bc8858072) with an even better improvement.
Use warning rather than error and then only display on verbose or greater.

level_3/fake/c/private-build-load.c

index 816796f31f8516e9c145e484536bc2321152342c..95339730b1f6aa4aec82011bef3e0e1d3bad11bd 100644 (file)
@@ -1392,18 +1392,18 @@ extern "C" {
           setting->search_shared = F_false;
         }
 
-        if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-          flockfile(data->main->error.to.stream);
-
-          fl_print_format("%r%[%QThe parameters '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_shared_disabled_s, data->main->error.notable);
-          fl_print_format("%[' and '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_shared_enabled_s, data->main->error.notable);
-          fl_print_format("%[' contradict, defaulting to '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, data->main->error.notable);
-          fl_print_format("%['.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
-
-          funlockfile(data->main->error.to.stream);
+        if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+          flockfile(data->main->warning.to.stream);
+
+          fl_print_format("%r%[%QThe parameters '%]", data->main->warning.to.stream, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, fake_long_shared_disabled_s, data->main->warning.notable);
+          fl_print_format("%[' and '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, fake_long_shared_enabled_s, data->main->warning.notable);
+          fl_print_format("%[' contradict, defaulting to '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, data->main->warning.notable);
+          fl_print_format("%['.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s);
+
+          funlockfile(data->main->warning.to.stream);
         }
       }
       else {
@@ -1427,18 +1427,18 @@ extern "C" {
           setting->search_static = F_false;
         }
 
-        if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-          flockfile(data->main->error.to.stream);
+        if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+          flockfile(data->main->warning.to.stream);
 
-          fl_print_format("%r%[%QThe parameters '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_static_disabled_s, data->main->error.notable);
-          fl_print_format("%[' and '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_static_enabled_s, data->main->error.notable);
-          fl_print_format("%[' contradict, defaulting to '%]", data->main->error.to.stream, data->main->error.context, data->main->error.context);
-          fl_print_format("%[%r%r%]", data->main->error.to.stream, data->main->error.notable, f_console_symbol_long_enable_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, data->main->error.notable);
-          fl_print_format("%['.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
+          fl_print_format("%r%[%QThe parameters '%]", data->main->warning.to.stream, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, fake_long_static_disabled_s, data->main->warning.notable);
+          fl_print_format("%[' and '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, fake_long_static_enabled_s, data->main->warning.notable);
+          fl_print_format("%[' contradict, defaulting to '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+          fl_print_format("%[%r%r%]", data->main->warning.to.stream, data->main->warning.notable, f_console_symbol_long_enable_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, data->main->warning.notable);
+          fl_print_format("%['.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s);
 
-          funlockfile(data->main->error.to.stream);
+          funlockfile(data->main->warning.to.stream);
         }
       }
       else {