소스 검색

Merge pull request #4062 from jbrazio/bugfix/compiler-warnings

Fixes misc gcc warnings
Scott Lahteine 9 년 전
부모
커밋
f66a194159
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5
    5
      Marlin/Marlin_main.cpp

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

@@ -1244,14 +1244,14 @@ inline bool code_value_bool() { return code_value_byte() > 0; }
1244 1244
   }
1245 1245
 
1246 1246
   inline float code_value_linear_units() { return code_value_float() * linear_unit_factor; }
1247
-  inline float code_value_per_axis_unit(int axis) { return code_value_float() / axis_unit_factor(axis); }
1248 1247
   inline float code_value_axis_units(int axis) { return code_value_float() * axis_unit_factor(axis); }
1248
+  inline float code_value_per_axis_unit(int axis) { return code_value_float() / axis_unit_factor(axis); }
1249 1249
 
1250 1250
 #else
1251 1251
 
1252 1252
   inline float code_value_linear_units() { return code_value_float(); }
1253
-  inline float code_value_per_axis_unit(int axis) { return code_value_float(); }
1254
-  inline float code_value_axis_units(int axis) { return code_value_float(); }
1253
+  inline float code_value_axis_units(int axis) { UNUSED(axis); return code_value_float(); }
1254
+  inline float code_value_per_axis_unit(int axis) { UNUSED(axis); return code_value_float(); }
1255 1255
 
1256 1256
 #endif
1257 1257
 
@@ -4892,7 +4892,7 @@ inline void gcode_M110() {
4892 4892
  * M111: Set the debug level
4893 4893
  */
4894 4894
 inline void gcode_M111() {
4895
-  marlin_debug_flags = code_seen('S') ? code_value_byte() : DEBUG_NONE;
4895
+  marlin_debug_flags = code_seen('S') ? code_value_byte() : (uint8_t) DEBUG_NONE;
4896 4896
 
4897 4897
   const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
4898 4898
   const static char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
@@ -7415,7 +7415,7 @@ void process_next_command() {
7415 7415
           gcode_M605();
7416 7416
           break;
7417 7417
       #endif // DUAL_X_CARRIAGE
7418
-      
7418
+
7419 7419
       #if ENABLED(LIN_ADVANCE)
7420 7420
         case 905: // M905 Set advance factor.
7421 7421
           gcode_M905();

Loading…
취소
저장