diff --git a/Marlin/src/core/mstring.h b/Marlin/src/core/mstring.h index 31e8c8c6e6ec..b405262d300d 100644 --- a/Marlin/src/core/mstring.h +++ b/Marlin/src/core/mstring.h @@ -143,13 +143,13 @@ class MString { // Set with format string and arguments, like printf template - MString& setf_P(PGM_P const fmt, Args... more) { SNPRINTF_P(str, SIZE, fmt, more...); debug(F("setf_P")); return *this; } + MString& setf_P(PGM_P const pfmt, Args... more) { SNPRINTF_P(str, SIZE, pfmt, more...); debug(F("setf_P")); return *this; } template - MString& setf(const char *fmt, Args... more) { SNPRINTF(str, SIZE, fmt, more...); debug(F("setf")); return *this; } + MString& setf(const char *fmt, Args... more) { SNPRINTF(str, SIZE, fmt, more...); debug(F("setf")); return *this; } template - MString& setf(FSTR_P const fmt, Args... more) { return setf_P(FTOP(fmt), more...); } + MString& setf(FSTR_P const ffmt, Args... more) { return setf_P(FTOP(ffmt), more...); } // Chainable String appenders MString& append() { debug(F("nil")); return *this; } // for macros that might emit no output @@ -206,9 +206,9 @@ class MString { MString& append(const spaces_t &s) { return append(repchr_t(' ', s.count)); } template - MString& appendf_P(PGM_P const fmt, Args... more) { + MString& appendf_P(PGM_P const pfmt, Args... more) { int sz = length(); - if (sz < SIZE) SNPRINTF_P(str + sz, SIZE - sz, fmt, more...); + if (sz < SIZE) SNPRINTF_P(str + sz, SIZE - sz, pfmt, more...); debug(F("appendf_P")); return *this; } diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index f9b73e6d2667..db8d06a297c1 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -271,13 +271,13 @@ class SString : public MString { SString& set() { super::set(); return *this; } template - SString& setf_P(PGM_P const fmt, Args... more) { super::setf_P(fmt, more...); return *this; } + SString& setf_P(PGM_P const pfmt, Args... more) { super::setf_P(pfmt, more...); return *this; } template - SString& setf(const char *fmt, Args... more) { super::setf(fmt, more...); return *this; } + SString& setf(const char *fmt, Args... more) { super::setf(fmt, more...); return *this; } template - SString& setf(FSTR_P const fmt, Args... more) { super::setf(fmt, more...); return *this; } + SString& setf(FSTR_P const ffmt, Args... more) { super::setf(ffmt, more...); return *this; } template SString& set(const T &v) { super::set(v); return *this; } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index dca18f2125ff..ef78dc2f1dc3 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1563,12 +1563,12 @@ void MarlinUI::host_notify(const char * const cstr) { * * @param pfmt A constant format P-string */ - void MarlinUI::status_printf_P(int8_t level, PGM_P const fmt, ...) { + void MarlinUI::status_printf_P(int8_t level, PGM_P const pfmt, ...) { if (set_alert_level(level)) return; va_list args; - va_start(args, fmt); - vsnprintf_P(status_message, MAX_MESSAGE_LENGTH, fmt, args); + va_start(args, pfmt); + vsnprintf_P(status_message, MAX_MESSAGE_LENGTH, pfmt, args); va_end(args); host_notify(status_message); @@ -1642,12 +1642,12 @@ void MarlinUI::host_notify(const char * const cstr) { void MarlinUI::_set_status_and_level(const char * const ustr, const int8_t=0, const bool pgm) { pgm ? host_notify_P(ustr) : host_notify(ustr); } - void MarlinUI::status_printf_P(int8_t level, PGM_P const fmt, ...) { + void MarlinUI::status_printf_P(int8_t level, PGM_P const pfmt, ...) { MString<30> msg; va_list args; - va_start(args, fmt); - vsnprintf_P(&msg, 30, fmt, args); + va_start(args, pfmt); + vsnprintf_P(&msg, 30, pfmt, args); va_end(args); host_notify(msg);