From 3ec17b3bdc9ccd47248b4d17a82e677509d73272 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Feb 2026 19:12:07 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Replace=20%?= =?UTF-8?q?lu=20=3D>=20%"=20PRIu32=20"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #28325 --- Marlin/src/HAL/HC32/sdio.cpp | 4 ++-- Marlin/src/HAL/STM32/sd/usb_host.cpp | 6 +++--- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 2 +- Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp | 2 +- Marlin/src/lcd/dwin/marlinui/game.cpp | 2 +- Marlin/src/lcd/menu/menu_mmu2.cpp | 2 +- .../UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h | 4 ++-- .../UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Marlin/src/HAL/HC32/sdio.cpp b/Marlin/src/HAL/HC32/sdio.cpp index 3c4038f92d..5f30dda720 100644 --- a/Marlin/src/HAL/HC32/sdio.cpp +++ b/Marlin/src/HAL/HC32/sdio.cpp @@ -109,7 +109,7 @@ bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { WITH_RETRY(SDIO_READ_RETRIES, { en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT); if (rc == Ok) return true; - printf("SDIO_ReadBlock error (rc=%u; ErrorCode=%lu)\n", rc, handle->u32ErrorCode); + printf("SDIO_ReadBlock error (rc=%u; ErrorCode=%" PRIu32 ")\n", rc, handle->u32ErrorCode); }) return false; @@ -122,7 +122,7 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { WITH_RETRY(SDIO_WRITE_RETRIES, { en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT); if (rc == Ok) return true; - printf("SDIO_WriteBlock error (rc=%u; ErrorCode=%lu)\n", rc, handle->u32ErrorCode); + printf("SDIO_WriteBlock error (rc=%u; ErrorCode=%" PRIu32 ")\n", rc, handle->u32ErrorCode); }) return false; diff --git a/Marlin/src/HAL/STM32/sd/usb_host.cpp b/Marlin/src/HAL/STM32/sd/usb_host.cpp index f411771c8a..ab3ce07ebe 100644 --- a/Marlin/src/HAL/STM32/sd/usb_host.cpp +++ b/Marlin/src/HAL/STM32/sd/usb_host.cpp @@ -88,9 +88,9 @@ void USBHost::setUsbTaskState(uint8_t state) { capacity = info.capacity.block_nbr / 2000; block_size = info.capacity.block_size; block_count = info.capacity.block_nbr; - //SERIAL_ECHOLNPGM("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr); - //SERIAL_ECHOLNPGM("info.capacity.block_size: %d\n", info.capacity.block_size); - //SERIAL_ECHOLNPGM("capacity : %d MB\n", capacity); + //SERIAL_ECHOLNPGM("info.capacity.block_nbr : ", info.capacity.block_nbr); + //SERIAL_ECHOLNPGM("info.capacity.block_size: ", info.capacity.block_size); + //SERIAL_ECHOLNPGM("capacity : ", capacity, "MB"); } }; diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index e586fcc27f..60cb91dc79 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1078,7 +1078,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(LCD_SHOW_E_TOTAL) char tmp[20]; const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm - sprintf_P(tmp, PSTR("E %ld%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm + sprintf_P(tmp, PSTR("E %" PRIu32 "%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm lcd_put_u8str(tmp); #endif } diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index e27636a9d8..585b492922 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -580,7 +580,7 @@ void MarlinUI::draw_status_screen() { if (show_e_total) { #if ENABLED(LCD_SHOW_E_TOTAL) const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm - sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm + sprintf_P(xstring, PSTR("%" PRIu32 "%cm"), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm #endif } else { diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 9daba7dd8f..a87686bfe9 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -615,7 +615,7 @@ void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool #if ENABLED(LCD_SHOW_E_TOTAL) char tmp[15]; const uint8_t escale = motion.e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm - sprintf_P(tmp, PSTR("E%-7ld%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm + sprintf_P(tmp, PSTR("E%-7" PRIu32 "%cm "), uint32_t(_MAX(motion.e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm write_str(tmp); #endif } diff --git a/Marlin/src/lcd/dwin/marlinui/game.cpp b/Marlin/src/lcd/dwin/marlinui/game.cpp index b77c72664f..dc0f42c642 100644 --- a/Marlin/src/lcd/dwin/marlinui/game.cpp +++ b/Marlin/src/lcd/dwin/marlinui/game.cpp @@ -104,7 +104,7 @@ void MarlinGame::frame_end() { char perf_str[32]; sprintf_P( perf_str, - PSTR("d%04lu w%04lu c%04lu"), + PSTR("d%04" PRIu32 " w%04" PRIu32 " c%04" PRIu32), frame_draw_millis, frame_wait_millis, dwin_game_perf.draw_calls diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp index d2ea07fe8f..e16196d62d 100644 --- a/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -209,7 +209,7 @@ void menu_mmu3_toolchange_stat_total() { sprintf_P(buffer1, PSTR("%u"), MMU3::operation_statistics.tool_change_counter); char buffer2[LCD_WIDTH]; - sprintf_P(buffer2, PSTR("%lu"), MMU3::operation_statistics.tool_change_total_counter); + sprintf_P(buffer2, PSTR("%" PRIu32 ""), MMU3::operation_statistics.tool_change_total_counter); START_SCREEN(); STATIC_ITEM(MSG_MMU_MATERIAL_CHANGES, SS_INVERT); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h index 06deb7a0ae..85a81f07f7 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h @@ -475,10 +475,10 @@ uint8_t UHS_NI UHS_Bulk_Storage::Start() { if(!rcode) { if(!UHS_SLEEP_MS(3)) goto FailUnPlug; BS_HOST_DEBUG("CheckLUN...\r\n"); - BS_HOST_DEBUG("%lu\r\n", millis()/1000); + BS_HOST_DEBUG("%" PRIu32 "\r\n", millis()/1000); // Stalls on ***some*** devices, ***WHY***?! Device SAID it is READY!! LUNOk[lun] = CheckLUN(lun); - BS_HOST_DEBUG("%lu\r\n", millis()/1000); + BS_HOST_DEBUG("%" PRIu32 "\r\n", millis()/1000); if(!LUNOk[lun]) LUNOk[lun] = CheckLUN(lun); if(!UHS_SLEEP_MS(1)) goto FailUnPlug; BS_HOST_DEBUG("Checked LUN...\r\n"); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h index 1dde32f949..d605de1c47 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h @@ -331,7 +331,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) { again: MAX3421E_SPI_Settings = SPISettings(spd, MSBFIRST, SPI_MODE0); if (reset() == 0) { - MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd); + MAX_HOST_DEBUG(PSTR("Fail SPI speed %" PRIu32 "\r\n"), spd); if (spd > 1999999) { spd -= 1000000; goto again; @@ -346,7 +346,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) { regWr(rGPINPOL, sample_wr); sample_rd = regRd(rGPINPOL); if (sample_rd != sample_wr) { - MAX_HOST_DEBUG(PSTR("Fail SPI speed %lu\r\n"), spd); + MAX_HOST_DEBUG(PSTR("Fail SPI speed %" PRIu32 "\r\n"), spd); if (spd > 1999999) { spd -= 1000000; goto again; @@ -358,7 +358,7 @@ int16_t UHS_NI MAX3421E_HOST::Init(int16_t mseconds) { regWr(rGPINPOL, gpinpol_copy); } - MAX_HOST_DEBUG(PSTR("Pass SPI speed %lu\r\n"), spd); + MAX_HOST_DEBUG(PSTR("Pass SPI speed %" PRIu32 "\r\n"), spd); #endif if (reset() == 0) { // OSCOKIRQ hasn't asserted in time