Browse Source

Fix some compile warnings (#12220)

Scott Lahteine 6 years ago
parent
commit
d015f746cc
No account linked to committer's email address

+ 1
- 1
Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp View File

@@ -43,7 +43,7 @@
43 43
   #include "MarlinSerial.h"
44 44
   #include "../../Marlin.h"
45 45
 
46
-  template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0 };
46
+  template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
47 47
   template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
48 48
   template<typename Cfg> bool     MarlinSerial<Cfg>::_written = false;
49 49
   template<typename Cfg> uint8_t  MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;

+ 1
- 1
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp View File

@@ -33,7 +33,7 @@
33 33
 #include "InterruptVectors_Due.h"
34 34
 #include "../../Marlin.h"
35 35
 
36
-template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0 };
36
+template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
37 37
 template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
38 38
 template<typename Cfg> bool     MarlinSerial<Cfg>::_written = false;
39 39
 template<typename Cfg> uint8_t  MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;

+ 2
- 2
Marlin/src/HAL/shared/Delay.h View File

@@ -140,9 +140,9 @@
140 140
 #endif
141 141
 
142 142
 // Delay in nanoseconds
143
-#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L )
143
+#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) / 1000UL )
144 144
 
145 145
 // Delay in microseconds
146
-#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) )
146
+#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) )
147 147
 
148 148
 #endif // MARLIN_DELAY_H

+ 1
- 1
Marlin/src/core/macros.h View File

@@ -49,7 +49,7 @@
49 49
 
50 50
 // Clock speed factors
51 51
 #if !defined(CYCLES_PER_MICROSECOND) && !defined(__STM32F1__)
52
-  #define CYCLES_PER_MICROSECOND (F_CPU / 1000000L) // 16 or 20 on AVR
52
+  #define CYCLES_PER_MICROSECOND (F_CPU / 1000000UL) // 16 or 20 on AVR
53 53
 #endif
54 54
 
55 55
 // Nanoseconds per cycle

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

@@ -927,7 +927,7 @@ void MarlinSettings::postprocess() {
927 927
     //
928 928
     {
929 929
       #if DISABLED(ADVANCED_PAUSE_FEATURE)
930
-        const fil_change_settings_t fc_settings[EXTRUDERS] = { { 0 } };
930
+        const fil_change_settings_t fc_settings[EXTRUDERS] = { 0, 0 };
931 931
       #endif
932 932
       _FIELD_TEST(fc_settings);
933 933
       EEPROM_WRITE(fc_settings);

Loading…
Cancel
Save