Clear up some more compile warnings

This commit is contained in:
Scott Lahteine 2018-05-17 18:40:22 -05:00
parent 06fd4d7b28
commit 50270b53a0
5 changed files with 61 additions and 61 deletions

View file

@ -290,6 +290,7 @@ extern "C" {
//! Bounds given integer size to allowed range and rounds it up to the nearest
//! available greater size, then applies register format of UOTGHS controller
//! 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)
//! 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)))

View file

@ -70,7 +70,6 @@ static uint8_t SPI_speed = 0;
static uint8_t rs_last_state = 255;
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
rs_last_state = rs;

View file

@ -443,7 +443,7 @@
uint16_t segments = lroundf(cartesian_xy_mm * (1.0 / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
#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
#if IS_SCARA // scale the feed rate from mm/s to degrees/s

View file

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

View file

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