mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
Suppress compile warnings
This commit is contained in:
parent
4b35ff1f07
commit
bd82b8bc7e
@ -285,6 +285,9 @@ void setup_powerhold() {
|
|||||||
|
|
||||||
#include "pins/sensitive_pins.h"
|
#include "pins/sensitive_pins.h"
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wnarrowing"
|
||||||
|
|
||||||
bool pin_is_protected(const pin_t pin) {
|
bool pin_is_protected(const pin_t pin) {
|
||||||
static const pin_t sensitive_pins[] PROGMEM = SENSITIVE_PINS;
|
static const pin_t sensitive_pins[] PROGMEM = SENSITIVE_PINS;
|
||||||
LOOP_L_N(i, COUNT(sensitive_pins)) {
|
LOOP_L_N(i, COUNT(sensitive_pins)) {
|
||||||
@ -295,6 +298,8 @@ bool pin_is_protected(const pin_t pin) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
void protected_pin_err() {
|
void protected_pin_err() {
|
||||||
SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN);
|
SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN);
|
||||||
}
|
}
|
||||||
|
@ -216,8 +216,14 @@ bool GCodeQueue::process_injected_command() {
|
|||||||
gcode.process_parsed_command();
|
gcode.process_parsed_command();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wrestrict"
|
||||||
|
|
||||||
// Copy the next command into place
|
// Copy the next command into place
|
||||||
strcpy(injected_commands, &injected_commands[i + (c != '\0')]);
|
strcpy(injected_commands, &injected_commands[i + (c != '\0')]);
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user