Browse Source

🎨 Pragma GCC cleanup

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
committed by Scott Lahteine
parent
commit
aa198e41dd
  1. 6
      Marlin/src/HAL/AVR/HAL.h
  2. 6
      Marlin/src/HAL/DUE/HAL.h
  3. 6
      Marlin/src/HAL/ESP32/HAL.h
  4. 6
      Marlin/src/HAL/LINUX/HAL.h
  5. 6
      Marlin/src/HAL/LPC1768/HAL.h
  6. 6
      Marlin/src/HAL/SAMD51/HAL.h
  7. 6
      Marlin/src/HAL/TEENSY31_32/HAL.h
  8. 6
      Marlin/src/HAL/TEENSY35_36/HAL.h
  9. 6
      Marlin/src/HAL/TEENSY40_41/HAL.h
  10. 6
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  11. 6
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp
  12. 6
      Marlin/src/libs/duration_t.h
  13. 6
      Marlin/src/module/endstops.cpp

6
Marlin/src/HAL/AVR/HAL.h

@ -157,16 +157,14 @@ inline uint8_t HAL_get_reset_source() { return MCUSR; }
void HAL_reboot(); void HAL_reboot();
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
extern "C" int freeMemory(); extern "C" int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// ADC // ADC
#ifdef DIDR2 #ifdef DIDR2

6
Marlin/src/HAL/DUE/HAL.h

@ -168,16 +168,14 @@ void HAL_init();
// //
void _delay_ms(const int delay); void _delay_ms(const int delay);
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
int freeMemory(); int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

6
Marlin/src/HAL/ESP32/HAL.h

@ -105,16 +105,14 @@ void HAL_reboot();
void _delay_ms(int delay); void _delay_ms(int delay);
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
int freeMemory(); int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
void analogWrite(pin_t pin, int value); void analogWrite(pin_t pin, int value);

6
Marlin/src/HAL/LINUX/HAL.h

@ -79,16 +79,14 @@ extern MSerialT usb_serial;
inline void HAL_init() {} inline void HAL_init() {}
// Utility functions // Utility functions
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
int freeMemory(); int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// ADC // ADC
#define HAL_ADC_VREF 5.0 #define HAL_ADC_VREF 5.0

6
Marlin/src/HAL/LPC1768/HAL.h

@ -123,16 +123,14 @@ extern DefaultSerial1 USBSerial;
// //
// Utility functions // Utility functions
// //
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
int freeMemory(); int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// //
// ADC API // ADC API

6
Marlin/src/HAL/SAMD51/HAL.h

@ -153,16 +153,14 @@ void HAL_idletask();
// //
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
int freeMemory(); int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

6
Marlin/src/HAL/TEENSY31_32/HAL.h

@ -98,16 +98,14 @@ void HAL_reboot();
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
extern "C" int freeMemory(); extern "C" int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// ADC // ADC

6
Marlin/src/HAL/TEENSY35_36/HAL.h

@ -105,16 +105,14 @@ void HAL_reboot();
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
extern "C" int freeMemory(); extern "C" int freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// ADC // ADC

6
Marlin/src/HAL/TEENSY40_41/HAL.h

@ -125,16 +125,14 @@ void HAL_reboot();
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
extern "C" uint32_t freeMemory(); extern "C" uint32_t freeMemory();
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
// ADC // ADC

6
Marlin/src/lcd/dogm/status_screen_DOGM.cpp

@ -862,17 +862,15 @@ void MarlinUI::draw_status_screen() {
mix_label = PSTR("Mx"); mix_label = PSTR("Mx");
} }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-overflow" #pragma GCC diagnostic ignored "-Wformat-overflow"
#endif #endif
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages); lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages);
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#else #else

6
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp

@ -27,8 +27,8 @@
#define ROUND(val) uint16_t((val)+0.5) #define ROUND(val) uint16_t((val)+0.5)
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wno-format" #pragma GCC diagnostic ignored "-Wno-format"
#endif #endif
@ -105,8 +105,6 @@ void format_position(char *str, float x, float y, float z) {
sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(MSG_UNITS_MM)); sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(MSG_UNITS_MM));
} }
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#endif // TOUCH_UI_FTDI_EVE #endif // TOUCH_UI_FTDI_EVE

6
Marlin/src/libs/duration_t.h

@ -106,8 +106,8 @@ struct duration_t {
return this->value; return this->value;
} }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-overflow" #pragma GCC diagnostic ignored "-Wformat-overflow"
#endif #endif
@ -170,7 +170,5 @@ struct duration_t {
} }
} }
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
}; };

6
Marlin/src/module/endstops.cpp

@ -478,8 +478,8 @@ void Endstops::event_handler() {
} }
} }
#pragma GCC diagnostic push
#if GCC_VERSION <= 50000 #if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
@ -489,9 +489,7 @@ static void print_es_state(const bool is_hit, FSTR_P const flabel=nullptr) {
SERIAL_ECHOLNF(is_hit ? F(STR_ENDSTOP_HIT) : F(STR_ENDSTOP_OPEN)); SERIAL_ECHOLNF(is_hit ? F(STR_ENDSTOP_HIT) : F(STR_ENDSTOP_OPEN));
} }
#if GCC_VERSION <= 50000 #pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
void _O2 Endstops::report_states() { void _O2 Endstops::report_states() {
TERN_(BLTOUCH, bltouch._set_SW_mode()); TERN_(BLTOUCH, bltouch._set_SW_mode());

Loading…
Cancel
Save