Merge pull request #4125 from jbrazio/bugfix/planner-warning

Fixes some compiler warnings
This commit is contained in:
Scott Lahteine 2016-06-22 19:34:37 -07:00 committed by GitHub
commit 61f34eec03
4 changed files with 11 additions and 7 deletions

View file

@ -474,6 +474,9 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
} }
static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) { static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
UNUSED(pstr);
UNUSED(pre_char);
char c; char c;
uint8_t n = LCD_WIDTH - 2; uint8_t n = LCD_WIDTH - 2;
@ -564,6 +567,7 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) { static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
UNUSED(pstr);
char c; char c;
uint8_t n = LCD_WIDTH - 1; uint8_t n = LCD_WIDTH - 1;

View file

@ -1057,7 +1057,7 @@ void Planner::check_axes_activity() {
// This leads to an enormous number of advance steps due to a huge e_acceleration. // This leads to an enormous number of advance steps due to a huge e_acceleration.
// The math is correct, but you don't want a retract move done with advance! // The math is correct, but you don't want a retract move done with advance!
// So this situation is filtered out here. // So this situation is filtered out here.
if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || bse == allsteps) { if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || (uint32_t) bse == allsteps) {
block->use_advance_lead = false; block->use_advance_lead = false;
} }
else { else {

View file

@ -1000,7 +1000,7 @@ void Stepper::digipot_init() {
SPI.begin(); SPI.begin();
pinMode(DIGIPOTSS_PIN, OUTPUT); pinMode(DIGIPOTSS_PIN, OUTPUT);
for (int i = 0; i < COUNT(digipot_motor_current); i++) { for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) {
//digitalPotWrite(digipot_ch[i], digipot_motor_current[i]); //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
digipot_current(i, digipot_motor_current[i]); digipot_current(i, digipot_motor_current[i]);
} }

View file

@ -135,7 +135,7 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
class U8GLIB_ST7920_128X64_RRD : public U8GLIB { class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
public: public:
U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) {} U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) { UNUSED(dummy); }
}; };