Browse Source

Fixes somes compiler warnings

João Brázio 8 years ago
parent
commit
664232140d
No account linked to committer's email address

+ 4
- 0
Marlin/dogm_lcd_implementation.h View File

@@ -474,6 +474,9 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
474 474
 }
475 475
 
476 476
 static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
477
+  UNUSED(pstr);
478
+  UNUSED(pre_char);
479
+
477 480
   char c;
478 481
   uint8_t n = LCD_WIDTH - 2;
479 482
 
@@ -564,6 +567,7 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
564 567
 #if ENABLED(SDSUPPORT)
565 568
 
566 569
   static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
570
+    UNUSED(pstr);
567 571
     char c;
568 572
     uint8_t n = LCD_WIDTH - 1;
569 573
 

+ 3
- 3
Marlin/planner.cpp View File

@@ -386,7 +386,7 @@ void Planner::recalculate() {
386 386
 #endif //AUTOTEMP
387 387
 
388 388
 /**
389
- * Maintain fans, paste extruder pressure, 
389
+ * Maintain fans, paste extruder pressure,
390 390
  */
391 391
 void Planner::check_axes_activity() {
392 392
   unsigned char axis_active[NUM_AXIS] = { 0 },
@@ -539,7 +539,7 @@ void Planner::check_axes_activity() {
539 539
   while (block_buffer_tail == next_buffer_head) idle();
540 540
 
541 541
   #if ENABLED(MESH_BED_LEVELING)
542
-    if (mbl.active()) 
542
+    if (mbl.active())
543 543
       z += mbl.get_z(x - home_offset[X_AXIS], y - home_offset[Y_AXIS]);
544 544
   #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
545 545
     apply_rotation_xyz(bed_level_matrix, x, y, z);
@@ -1057,7 +1057,7 @@ void Planner::check_axes_activity() {
1057 1057
     // This leads to an enormous number of advance steps due to a huge e_acceleration.
1058 1058
     // The math is correct, but you don't want a retract move done with advance!
1059 1059
     // So this situation is filtered out here.
1060
-    if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || bse == allsteps) {
1060
+    if (!bse || (!bsx && !bsy && !bsz) || stepper.get_advance_k() == 0 || (uint32_t) bse == allsteps) {
1061 1061
       block->use_advance_lead = false;
1062 1062
     }
1063 1063
     else {

+ 3
- 3
Marlin/stepper.cpp View File

@@ -380,7 +380,7 @@ void Stepper::isr() {
380 380
         }
381 381
 
382 382
       #endif // ADVANCE or LIN_ADVANCE
383
-      
383
+
384 384
       #define _COUNTER(AXIS) counter_## AXIS
385 385
       #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
386 386
       #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
@@ -468,7 +468,7 @@ void Stepper::isr() {
468 468
       timer = calc_timer(step_rate);
469 469
       OCR1A = timer;
470 470
       deceleration_time += timer;
471
-      
471
+
472 472
       #if ENABLED(LIN_ADVANCE)
473 473
 
474 474
         if (current_block->use_advance_lead)
@@ -998,7 +998,7 @@ void Stepper::digipot_init() {
998 998
 
999 999
     SPI.begin();
1000 1000
     pinMode(DIGIPOTSS_PIN, OUTPUT);
1001
-    for (int i = 0; i < COUNT(digipot_motor_current); i++) {
1001
+    for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) {
1002 1002
       //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
1003 1003
       digipot_current(i, digipot_motor_current[i]);
1004 1004
     }

+ 1
- 1
Marlin/temperature.cpp View File

@@ -462,7 +462,7 @@ int Temperature::getHeaterPower(int heater) {
462 462
       EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
463 463
     };
464 464
     uint8_t fanState = 0;
465
-    for (int f = 0; f <= HOTENDS; f++) {
465
+    for (int f = 0; f < HOTENDS; f++) {
466 466
       if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE)
467 467
         SBI(fanState, fanBit[f]);
468 468
     }

+ 1
- 1
Marlin/ultralcd_st7920_u8glib_rrd.h View File

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

Loading…
Cancel
Save