diff --git a/Marlin/src/core/mstring.h b/Marlin/src/core/mstring.h index bdfc95f9dc..f78ba601b1 100644 --- a/Marlin/src/core/mstring.h +++ b/Marlin/src/core/mstring.h @@ -73,6 +73,10 @@ extern void SERIAL_CHAR(char c); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#if DISABLED(UNSAFE_MSTRING) + #pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif + /** * @brief MString class template * @details A class template providing convenient string operators,