Suppress compile warnings

This commit is contained in:
Scott Lahteine 2020-04-28 08:30:52 -05:00
parent 4b35ff1f07
commit bd82b8bc7e
2 changed files with 11 additions and 0 deletions

View File

@ -285,6 +285,9 @@ void setup_powerhold() {
#include "pins/sensitive_pins.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
bool pin_is_protected(const pin_t pin) {
static const pin_t sensitive_pins[] PROGMEM = SENSITIVE_PINS;
LOOP_L_N(i, COUNT(sensitive_pins)) {
@ -295,6 +298,8 @@ bool pin_is_protected(const pin_t pin) {
return false;
}
#pragma GCC diagnostic pop
void protected_pin_err() {
SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN);
}

View File

@ -216,8 +216,14 @@ bool GCodeQueue::process_injected_command() {
gcode.process_parsed_command();
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wrestrict"
// Copy the next command into place
strcpy(injected_commands, &injected_commands[i + (c != '\0')]);
#pragma GCC diagnostic pop
return true;
}