Sfoglia il codice sorgente

Suppress compile warnings

Scott Lahteine 4 anni fa
parent
commit
bd82b8bc7e
2 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 5
    0
      Marlin/src/MarlinCore.cpp
  2. 6
    0
      Marlin/src/gcode/queue.cpp

+ 5
- 0
Marlin/src/MarlinCore.cpp Vedi File

@@ -285,6 +285,9 @@ void setup_powerhold() {
285 285
 
286 286
 #include "pins/sensitive_pins.h"
287 287
 
288
+#pragma GCC diagnostic push
289
+#pragma GCC diagnostic ignored "-Wnarrowing"
290
+
288 291
 bool pin_is_protected(const pin_t pin) {
289 292
   static const pin_t sensitive_pins[] PROGMEM = SENSITIVE_PINS;
290 293
   LOOP_L_N(i, COUNT(sensitive_pins)) {
@@ -295,6 +298,8 @@ bool pin_is_protected(const pin_t pin) {
295 298
   return false;
296 299
 }
297 300
 
301
+#pragma GCC diagnostic pop
302
+
298 303
 void protected_pin_err() {
299 304
   SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN);
300 305
 }

+ 6
- 0
Marlin/src/gcode/queue.cpp Vedi File

@@ -216,8 +216,14 @@ bool GCodeQueue::process_injected_command() {
216 216
     gcode.process_parsed_command();
217 217
   }
218 218
 
219
+  #pragma GCC diagnostic push
220
+  #pragma GCC diagnostic ignored "-Wrestrict"
221
+
219 222
   // Copy the next command into place
220 223
   strcpy(injected_commands, &injected_commands[i + (c != '\0')]);
224
+
225
+  #pragma GCC diagnostic pop
226
+
221 227
   return true;
222 228
 }
223 229
 

Loading…
Annulla
Salva