Browse Source

Fixes somes compiler warnings

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

+ 4
- 0
Marlin/dogm_lcd_implementation.h View File

474
 }
474
 }
475
 
475
 
476
 static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) {
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
   char c;
480
   char c;
478
   uint8_t n = LCD_WIDTH - 2;
481
   uint8_t n = LCD_WIDTH - 2;
479
 
482
 
564
 #if ENABLED(SDSUPPORT)
567
 #if ENABLED(SDSUPPORT)
565
 
568
 
566
   static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
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
     char c;
571
     char c;
568
     uint8_t n = LCD_WIDTH - 1;
572
     uint8_t n = LCD_WIDTH - 1;
569
 
573
 

+ 3
- 3
Marlin/planner.cpp View File

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

+ 3
- 3
Marlin/stepper.cpp View File

380
         }
380
         }
381
 
381
 
382
       #endif // ADVANCE or LIN_ADVANCE
382
       #endif // ADVANCE or LIN_ADVANCE
383
-      
383
+
384
       #define _COUNTER(AXIS) counter_## AXIS
384
       #define _COUNTER(AXIS) counter_## AXIS
385
       #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
385
       #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
386
       #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
386
       #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
468
       timer = calc_timer(step_rate);
468
       timer = calc_timer(step_rate);
469
       OCR1A = timer;
469
       OCR1A = timer;
470
       deceleration_time += timer;
470
       deceleration_time += timer;
471
-      
471
+
472
       #if ENABLED(LIN_ADVANCE)
472
       #if ENABLED(LIN_ADVANCE)
473
 
473
 
474
         if (current_block->use_advance_lead)
474
         if (current_block->use_advance_lead)
998
 
998
 
999
     SPI.begin();
999
     SPI.begin();
1000
     pinMode(DIGIPOTSS_PIN, OUTPUT);
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
       //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
1002
       //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]);
1003
       digipot_current(i, digipot_motor_current[i]);
1003
       digipot_current(i, digipot_motor_current[i]);
1004
     }
1004
     }

+ 1
- 1
Marlin/temperature.cpp View File

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

+ 1
- 1
Marlin/ultralcd_st7920_u8glib_rrd.h View File

135
 
135
 
136
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
136
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
137
  public:
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