소스 검색

Fix compiler warning in M145

Scott Lahteine 7 년 전
부모
커밋
396434a445
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      Marlin/Marlin_main.cpp

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

@@ -5518,8 +5518,8 @@ inline void gcode_M140() {
5518 5518
    *   F<fan speed>
5519 5519
    */
5520 5520
   inline void gcode_M145() {
5521
-    int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0;
5522
-    if (material < 0 || material >= COUNT(lcd_preheat_hotend_temp)) {
5521
+    uint8_t material = code_seen('S') ? (uint8_t)code_value_int() : 0;
5522
+    if (material >= COUNT(lcd_preheat_hotend_temp)) {
5523 5523
       SERIAL_ERROR_START;
5524 5524
       SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
5525 5525
     }

Loading…
취소
저장