Browse Source

Fix some compile warnings (#12220)

pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
d015f746cc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
  2. 2
      Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
  3. 4
      Marlin/src/HAL/shared/Delay.h
  4. 2
      Marlin/src/core/macros.h
  5. 2
      Marlin/src/module/configuration_store.cpp

2
Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp

@ -43,7 +43,7 @@
#include "MarlinSerial.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> 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;

2
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp

@ -33,7 +33,7 @@
#include "InterruptVectors_Due.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> 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;

4
Marlin/src/HAL/shared/Delay.h

@ -140,9 +140,9 @@
#endif
// 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
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) )
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) )
#endif // MARLIN_DELAY_H

2
Marlin/src/core/macros.h

@ -49,7 +49,7 @@
// Clock speed factors
#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
// Nanoseconds per cycle

2
Marlin/src/module/configuration_store.cpp

@ -927,7 +927,7 @@ void MarlinSettings::postprocess() {
//
{
#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
_FIELD_TEST(fc_settings);
EEPROM_WRITE(fc_settings);

Loading…
Cancel
Save