From be69ec5b323d4d7fdd3b65bc4b1bfded69badd3d Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 22 Jun 2019 07:48:47 +0200 Subject: [PATCH] Fix PLR/M43 warnings (#14333) --- Marlin/src/HAL/HAL_STM32F1/HAL_Servo_STM32F1.cpp | 4 ++-- Marlin/src/feature/power_loss_recovery.cpp | 2 +- Marlin/src/gcode/config/M43.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_STM32F1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_STM32F1.cpp index 3793919a8..8ab933120 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_STM32F1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_STM32F1.cpp @@ -98,7 +98,7 @@ bool libServo::attach(const int32_t pin, const int32_t minAngle, const int32_t m if (!PWM_PIN(pin)) return false; timer_dev *tdev = PIN_MAP[pin].timer_device; - uint8_t tchan = PIN_MAP[pin].timer_channel; + //uint8_t tchan = PIN_MAP[pin].timer_channel; SET_PWM(pin); servoWrite(pin, 0); @@ -221,7 +221,7 @@ void libServo::move(const int32_t value) { #else - bool libServo::setupSoftPWM(const int32_t pin) {} + bool libServo::setupSoftPWM(const int32_t pin) { return false; } void libServo::pwmSetDuty(const uint16_t duty_cycle) {} void libServo::pauseSoftPWM() {} diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp index 6394a611c..2fa184890 100644 --- a/Marlin/src/feature/power_loss_recovery.cpp +++ b/Marlin/src/feature/power_loss_recovery.cpp @@ -278,7 +278,7 @@ void PrintJobRecovery::resume() { // Pretend that all axes are homed axis_homed = axis_known_position = xyz_bits; - char cmd[50], str_1[16], str_2[16]; + char cmd[MAX_CMD_SIZE+16], str_1[16], str_2[16]; // Select the previously active tool (with no_move) #if EXTRUDERS > 1 diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 3c53c3de6..5e229cba5 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -114,7 +114,7 @@ inline void servo_probe_test() { ", stow angle: ", servo_angles[probe_index][1] ); - bool deploy_state, stow_state; + bool deploy_state = false, stow_state; #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)