Browse Source

Clear up some more compile warnings

pull/1/head
Scott Lahteine 7 years ago
parent
commit
50270b53a0
  1. 1
      Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h
  2. 1
      Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
  3. 2
      Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
  4. 2
      Marlin/src/gcode/lcd/M300.cpp
  5. 4
      Marlin/src/module/motion.cpp

1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h

@ -290,6 +290,7 @@ extern "C" {
//! Bounds given integer size to allowed range and rounds it up to the nearest //! Bounds given integer size to allowed range and rounds it up to the nearest
//! available greater size, then applies register format of UOTGHS controller //! available greater size, then applies register format of UOTGHS controller
//! for endpoint size bit-field. //! for endpoint size bit-field.
#undef udd_format_endpoint_size
#define udd_format_endpoint_size(size) (32 - clz(((uint32_t)MIN(MAX(size, 8), 1024) << 1) - 1) - 1 - 3) #define udd_format_endpoint_size(size) (32 - clz(((uint32_t)MIN(MAX(size, 8), 1024) << 1) - 1) - 1 - 3)
//! Configures the selected endpoint size //! Configures the selected endpoint size
#define udd_configure_endpoint_size(ep, size) (Wr_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk, udd_format_endpoint_size(size))) #define udd_configure_endpoint_size(ep, size) (Wr_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk, udd_format_endpoint_size(size)))

1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp

@ -70,7 +70,6 @@ static uint8_t SPI_speed = 0;
static uint8_t rs_last_state = 255; static uint8_t rs_last_state = 255;
static void u8g_com_LPC1768_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) { static void u8g_com_LPC1768_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) {
uint8_t i;
if (rs != rs_last_state) { // time to send a command/data byte if (rs != rs_last_state) { // time to send a command/data byte
rs_last_state = rs; rs_last_state = rs;

2
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp

@ -443,7 +443,7 @@
uint16_t segments = lroundf(cartesian_xy_mm * (1.0 / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length uint16_t segments = lroundf(cartesian_xy_mm * (1.0 / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
#endif #endif
NOLESS(segments, 1); // must have at least one segment NOLESS(segments, 1U); // must have at least one segment
const float inv_segments = 1.0 / segments; // divide once, multiply thereafter const float inv_segments = 1.0 / segments; // divide once, multiply thereafter
#if IS_SCARA // scale the feed rate from mm/s to degrees/s #if IS_SCARA // scale the feed rate from mm/s to degrees/s

2
Marlin/src/gcode/lcd/M300.cpp

@ -37,7 +37,7 @@ void GcodeSuite::M300() {
uint16_t duration = parser.ushortval('P', 1000); uint16_t duration = parser.ushortval('P', 1000);
// Limits the tone duration to 0-5 seconds. // Limits the tone duration to 0-5 seconds.
NOMORE(duration, 5000); NOMORE(duration, 5000U);
BUZZ(duration, frequency); BUZZ(duration, frequency);
} }

4
Marlin/src/module/motion.cpp

@ -570,7 +570,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
#endif #endif
// At least one segment is required // At least one segment is required
NOLESS(segments, 1); NOLESS(segments, 1U);
// The approximate length of each segment // The approximate length of each segment
const float inv_segments = 1.0 / float(segments), const float inv_segments = 1.0 / float(segments),
@ -717,7 +717,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
// The length divided by the segment size // The length divided by the segment size
// At least one segment is required // At least one segment is required
uint16_t segments = cartesian_mm / segment_size; uint16_t segments = cartesian_mm / segment_size;
NOLESS(segments, 1); NOLESS(segments, 1U);
// The approximate length of each segment // The approximate length of each segment
const float inv_segments = 1.0 / float(segments), const float inv_segments = 1.0 / float(segments),

Loading…
Cancel
Save