Browse Source

Remove strcpy compile warning

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
d853a70556
  1. 11
      Marlin/src/gcode/queue.cpp

11
Marlin/src/gcode/queue.cpp

@ -216,13 +216,12 @@ 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
for (
uint8_t d = 0, s = i + !!c; // dst, src
(injected_commands[d] = injected_commands[s]); // copy, exit if 0
d++, s++ // next dst, src
);
return true;
}

Loading…
Cancel
Save