소스 검색

Removes some minor GCC warnings

João Brázio 8 년 전
부모
커밋
79e7721b76
1개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 9
    9
      Marlin/Marlin_main.cpp

+ 9
- 9
Marlin/Marlin_main.cpp 파일 보기

@@ -5325,7 +5325,7 @@ inline void gcode_M200() {
5325 5325
     if (volumetric_enabled) {
5326 5326
       filament_size[target_extruder] = code_value_linear_units();
5327 5327
       // make sure all extruders have some sane value for the filament size
5328
-      for (int i = 0; i < COUNT(filament_size); i++)
5328
+      for (uint8_t i = 0; i < COUNT(filament_size); i++)
5329 5329
         if (! filament_size[i]) filament_size[i] = DEFAULT_NOMINAL_FILAMENT_DIA;
5330 5330
     }
5331 5331
   }
@@ -6825,7 +6825,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6825 6825
             // <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower.
6826 6826
             float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder],
6827 6827
                   z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0);
6828
-          
6828
+
6829 6829
             // Always raise by some amount
6830 6830
             planner.buffer_line(
6831 6831
               current_position[X_AXIS],
@@ -6836,10 +6836,10 @@ inline void gcode_T(uint8_t tmp_extruder) {
6836 6836
               active_extruder
6837 6837
             );
6838 6838
             stepper.synchronize();
6839
-          
6839
+
6840 6840
             move_extruder_servo(active_extruder);
6841 6841
             delay(500);
6842
-          
6842
+
6843 6843
             // Move back down, if needed
6844 6844
             if (z_raise != z_diff) {
6845 6845
               planner.buffer_line(
@@ -6853,7 +6853,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6853 6853
               stepper.synchronize();
6854 6854
             }
6855 6855
           #endif
6856
-          
6856
+
6857 6857
           /**
6858 6858
            * Set current_position to the position of the new nozzle.
6859 6859
            * Offsets are based on linear distance, so we need to get
@@ -6906,7 +6906,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6906 6906
             current_position[Z_AXIS] += offset_vec.z;
6907 6907
 
6908 6908
           #else // !AUTO_BED_LEVELING_FEATURE
6909
-  
6909
+
6910 6910
             float xydiff[2] = {
6911 6911
               hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
6912 6912
               hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder]
@@ -6930,7 +6930,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6930 6930
               }
6931 6931
 
6932 6932
             #endif // MESH_BED_LEVELING
6933
-  
6933
+
6934 6934
           #endif // !AUTO_BED_LEVELING_FEATURE
6935 6935
 
6936 6936
           #if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -6993,7 +6993,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6993 6993
         SERIAL_ECHOLNPGM("<<< gcode_T");
6994 6994
       }
6995 6995
     #endif
6996
-  
6996
+
6997 6997
     SERIAL_ECHO_START;
6998 6998
     SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER);
6999 6999
     SERIAL_PROTOCOLLN((int)active_extruder);
@@ -8695,6 +8695,6 @@ float calculate_volumetric_multiplier(float diameter) {
8695 8695
 }
8696 8696
 
8697 8697
 void calculate_volumetric_multipliers() {
8698
-  for (int i = 0; i < COUNT(filament_size); i++)
8698
+  for (uint8_t i = 0; i < COUNT(filament_size); i++)
8699 8699
     volumetric_multiplier[i] = calculate_volumetric_multiplier(filament_size[i]);
8700 8700
 }

Loading…
취소
저장