From 6c387384c7ba7417827fd21249ddb129018770aa Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 13 Aug 2018 19:43:37 +0200 Subject: [PATCH] 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; --- Firmware/Marlin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 3912c9a2b..4af4af491 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -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)