Bladeren bron

Remove local variable verbosity_level, which was masking function parameter of the same name. Remove duplicate code to derive verbosity level.

Problem manifested itself as compiler warning: sketch/Marlin_main.cpp:2881:6: warning: unused parameter 'verbosity_level' [-Wunused-parameter]
 bool gcode_M45(bool onlyZ, int8_t verbosity_level)
Marek Bel 6 jaren geleden
bovenliggende
commit
5846707c5a
1 gewijzigde bestanden met toevoegingen van 0 en 9 verwijderingen
  1. 0 9
      Firmware/Marlin_main.cpp

+ 0 - 9
Firmware/Marlin_main.cpp

@@ -2965,15 +2965,6 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
 
 		if (st_get_position_mm(Z_AXIS) == MESH_HOME_Z_SEARCH)
 		{
-
-			int8_t verbosity_level = 0;
-			if (code_seen('V'))
-			{
-				// Just 'V' without a number counts as V1.
-				char c = strchr_pointer[1];
-				verbosity_level = (c == ' ' || c == '\t' || c == 0) ? 1 : code_value_short();
-			}
-
 			if (onlyZ)
 			{
 				clean_up_after_endstop_move();