Fix some compile warnings (#12220)

This commit is contained in:
Scott Lahteine 2018-10-26 03:53:06 -05:00 committed by GitHub
parent dacb5324e8
commit d015f746cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

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

View file

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

View file

@ -140,9 +140,9 @@
#endif #endif
// Delay in nanoseconds // Delay in nanoseconds
#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L ) #define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) / 1000UL )
// Delay in microseconds // Delay in microseconds
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) ) #define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) )
#endif // MARLIN_DELAY_H #endif // MARLIN_DELAY_H

View file

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

View file

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