1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

🩹 Fix pragma ignored for older GCC (#22978)

This commit is contained in:
Mike La Spina 2021-10-19 06:05:23 -05:00 committed by GitHub
parent 5f7c92dfbb
commit 52edc543bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1095,14 +1095,15 @@ void GcodeSuite::process_next_command() {
process_parsed_command(); process_parsed_command();
} }
#pragma GCC diagnostic push
#if GCC_VERSION >= 80000
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
/** /**
* Run a series of commands, bypassing the command queue to allow * Run a series of commands, bypassing the command queue to allow
* G-code "macros" to be called from within other G-code handlers. * G-code "macros" to be called from within other G-code handlers.
*/ */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
void GcodeSuite::process_subcommands_now(FSTR_P fgcode) { void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
PGM_P pgcode = FTOP(fgcode); PGM_P pgcode = FTOP(fgcode);
char * const saved_cmd = parser.command_ptr; // Save the parser state char * const saved_cmd = parser.command_ptr; // Save the parser state