Skip to content

Fix warnings with GCC14 and C++23 #27768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/module/planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
1 change: 0 additions & 1 deletion ini/gd32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ build_flags = -std=gnu++23
-DADC_RESOLUTION=12
-DCORE_DEBUG
-Wno-deprecated-declarations
-Wno-volatile
extra_scripts = ${common.extra_scripts}

#
Expand Down
Loading