Browse Source

Suppress compile warnings

Scott Lahteine 4 years ago
parent
commit
bd82b8bc7e
2 changed files with 11 additions and 0 deletions
  1. 5
    0
      Marlin/src/MarlinCore.cpp
  2. 6
    0
      Marlin/src/gcode/queue.cpp

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

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

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

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

Loading…
Cancel
Save