mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-01-06 22:57:43 -07:00
🔨 Fix GCC14 / C++23 volatile warnings (#27768)
This commit is contained in:
parent
766dfda80e
commit
99b790cc92
3 changed files with 8 additions and 3 deletions
|
|
@ -1582,7 +1582,9 @@ void Planner::quick_stop() {
|
|||
const bool was_enabled = stepper.suspend();
|
||||
|
||||
// Drop all queue entries
|
||||
block_buffer_nonbusy = block_buffer_head = block_buffer_tail;
|
||||
const uint8_t tail_value = block_buffer_tail; // Read tail value once
|
||||
block_buffer_head = tail_value;
|
||||
block_buffer_nonbusy = tail_value;
|
||||
|
||||
// Restart the block delay for the first movement - As the queue was
|
||||
// forced to empty, there's no risk the ISR will touch this.
|
||||
|
|
|
|||
|
|
@ -816,7 +816,11 @@ class Planner {
|
|||
FORCE_INLINE static uint8_t nonbusy_movesplanned() { return block_dec_mod(block_buffer_head, block_buffer_nonbusy); }
|
||||
|
||||
// Remove all blocks from the buffer
|
||||
FORCE_INLINE static void clear_block_buffer() { block_buffer_nonbusy = block_buffer_head = block_buffer_tail = 0; }
|
||||
FORCE_INLINE static void clear_block_buffer() {
|
||||
block_buffer_tail = 0;
|
||||
block_buffer_head = 0;
|
||||
block_buffer_nonbusy = 0;
|
||||
}
|
||||
|
||||
// Check if movement queue is full
|
||||
FORCE_INLINE static bool is_full() { return block_buffer_tail == next_block_index(block_buffer_head); }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ build_flags = -std=gnu++23
|
|||
-DADC_RESOLUTION=12
|
||||
-DCORE_DEBUG
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-volatile
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue