Fix compiler warnings: sketch/Marlin.h:366:35: warning: large integer implicitly truncated to unsigned type [-Woverflow]

#define PRINT_TIME_REMAINING_INIT 0xffffffff
sketch/Marlin_main.cpp:8814:21: note: in expansion of macro 'PRINT_TIME_REMAINING_INIT'
  uint16_t print_t = PRINT_TIME_REMAINING_INIT;
sketch/Marlin_main.cpp:8817:15: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100 * print_t / feedmultiply;
This commit is contained in:
Marek Bel 2018-08-13 19:43:37 +02:00
parent ac62117d6b
commit 6c387384c7

View file

@ -363,7 +363,7 @@ extern uint8_t print_percent_done_normal;
extern uint32_t print_time_remaining_normal;
extern uint8_t print_percent_done_silent;
extern uint32_t print_time_remaining_silent;
#define PRINT_TIME_REMAINING_INIT 0xffffffff
#define PRINT_TIME_REMAINING_INIT 0xffff
#define PRINT_PERCENT_DONE_INIT 0xff
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == 4) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)