mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-26 21:36:21 +00:00
🩹 Fix memset block warning
This commit is contained in:
parent
cc51bc29e1
commit
d9ec3795fb
@ -2896,7 +2896,7 @@ void Planner::buffer_sync_block(TERN_(LASER_SYNCHRONOUS_M106_M107, const BlockFl
|
|||||||
block_t * const block = get_next_free_block(next_buffer_head);
|
block_t * const block = get_next_free_block(next_buffer_head);
|
||||||
|
|
||||||
// Clear block
|
// Clear block
|
||||||
memset(block, 0, sizeof(block_t));
|
block->reset();
|
||||||
|
|
||||||
block->flag.apply(sync_flag);
|
block->flag.apply(sync_flag);
|
||||||
|
|
||||||
|
@ -274,6 +274,8 @@ typedef struct block_t {
|
|||||||
block_laser_t laser;
|
block_laser_t laser;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void reset() { memset((char*)this, 0, sizeof(*this)); }
|
||||||
|
|
||||||
} block_t;
|
} block_t;
|
||||||
|
|
||||||
#if ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX, LCD_SHOW_E_TOTAL, POWER_LOSS_RECOVERY)
|
#if ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX, LCD_SHOW_E_TOTAL, POWER_LOSS_RECOVERY)
|
||||||
|
Loading…
Reference in New Issue
Block a user