Scott Lahteine 3 лет назад
Родитель
Сommit
1f3f9cb68c

+ 2
- 4
Marlin/src/HAL/AVR/HAL.h Просмотреть файл

@@ -157,16 +157,14 @@ inline uint8_t HAL_get_reset_source() { return MCUSR; }
157 157
 
158 158
 void HAL_reboot();
159 159
 
160
+#pragma GCC diagnostic push
160 161
 #if GCC_VERSION <= 50000
161
-  #pragma GCC diagnostic push
162 162
   #pragma GCC diagnostic ignored "-Wunused-function"
163 163
 #endif
164 164
 
165 165
 extern "C" int freeMemory();
166 166
 
167
-#if GCC_VERSION <= 50000
168
-  #pragma GCC diagnostic pop
169
-#endif
167
+#pragma GCC diagnostic pop
170 168
 
171 169
 // ADC
172 170
 #ifdef DIDR2

+ 2
- 4
Marlin/src/HAL/DUE/HAL.h Просмотреть файл

@@ -168,16 +168,14 @@ void HAL_init();
168 168
 //
169 169
 void _delay_ms(const int delay);
170 170
 
171
+#pragma GCC diagnostic push
171 172
 #if GCC_VERSION <= 50000
172
-  #pragma GCC diagnostic push
173 173
   #pragma GCC diagnostic ignored "-Wunused-function"
174 174
 #endif
175 175
 
176 176
 int freeMemory();
177 177
 
178
-#if GCC_VERSION <= 50000
179
-  #pragma GCC diagnostic pop
180
-#endif
178
+#pragma GCC diagnostic pop
181 179
 
182 180
 #ifdef __cplusplus
183 181
   extern "C" {

+ 2
- 4
Marlin/src/HAL/ESP32/HAL.h Просмотреть файл

@@ -105,16 +105,14 @@ void HAL_reboot();
105 105
 
106 106
 void _delay_ms(int delay);
107 107
 
108
+#pragma GCC diagnostic push
108 109
 #if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic push
110 110
   #pragma GCC diagnostic ignored "-Wunused-function"
111 111
 #endif
112 112
 
113 113
 int freeMemory();
114 114
 
115
-#if GCC_VERSION <= 50000
116
-  #pragma GCC diagnostic pop
117
-#endif
115
+#pragma GCC diagnostic pop
118 116
 
119 117
 void analogWrite(pin_t pin, int value);
120 118
 

+ 2
- 4
Marlin/src/HAL/LINUX/HAL.h Просмотреть файл

@@ -79,16 +79,14 @@ extern MSerialT usb_serial;
79 79
 inline void HAL_init() {}
80 80
 
81 81
 // Utility functions
82
+#pragma GCC diagnostic push
82 83
 #if GCC_VERSION <= 50000
83
-  #pragma GCC diagnostic push
84 84
   #pragma GCC diagnostic ignored "-Wunused-function"
85 85
 #endif
86 86
 
87 87
 int freeMemory();
88 88
 
89
-#if GCC_VERSION <= 50000
90
-  #pragma GCC diagnostic pop
91
-#endif
89
+#pragma GCC diagnostic pop
92 90
 
93 91
 // ADC
94 92
 #define HAL_ADC_VREF           5.0

+ 2
- 4
Marlin/src/HAL/LPC1768/HAL.h Просмотреть файл

@@ -123,16 +123,14 @@ extern DefaultSerial1 USBSerial;
123 123
 //
124 124
 // Utility functions
125 125
 //
126
+#pragma GCC diagnostic push
126 127
 #if GCC_VERSION <= 50000
127
-  #pragma GCC diagnostic push
128 128
   #pragma GCC diagnostic ignored "-Wunused-function"
129 129
 #endif
130 130
 
131 131
 int freeMemory();
132 132
 
133
-#if GCC_VERSION <= 50000
134
-  #pragma GCC diagnostic pop
135
-#endif
133
+#pragma GCC diagnostic pop
136 134
 
137 135
 //
138 136
 // ADC API

+ 2
- 4
Marlin/src/HAL/SAMD51/HAL.h Просмотреть файл

@@ -153,16 +153,14 @@ void HAL_idletask();
153 153
 //
154 154
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
155 155
 
156
+#pragma GCC diagnostic push
156 157
 #if GCC_VERSION <= 50000
157
-  #pragma GCC diagnostic push
158 158
   #pragma GCC diagnostic ignored "-Wunused-function"
159 159
 #endif
160 160
 
161 161
 int freeMemory();
162 162
 
163
-#if GCC_VERSION <= 50000
164
-  #pragma GCC diagnostic pop
165
-#endif
163
+#pragma GCC diagnostic pop
166 164
 
167 165
 #ifdef __cplusplus
168 166
   extern "C" {

+ 2
- 4
Marlin/src/HAL/TEENSY31_32/HAL.h Просмотреть файл

@@ -98,16 +98,14 @@ void HAL_reboot();
98 98
 
99 99
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
100 100
 
101
+#pragma GCC diagnostic push
101 102
 #if GCC_VERSION <= 50000
102
-  #pragma GCC diagnostic push
103 103
   #pragma GCC diagnostic ignored "-Wunused-function"
104 104
 #endif
105 105
 
106 106
 extern "C" int freeMemory();
107 107
 
108
-#if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic pop
110
-#endif
108
+#pragma GCC diagnostic pop
111 109
 
112 110
 // ADC
113 111
 

+ 2
- 4
Marlin/src/HAL/TEENSY35_36/HAL.h Просмотреть файл

@@ -105,16 +105,14 @@ void HAL_reboot();
105 105
 
106 106
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
107 107
 
108
+#pragma GCC diagnostic push
108 109
 #if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic push
110 110
   #pragma GCC diagnostic ignored "-Wunused-function"
111 111
 #endif
112 112
 
113 113
 extern "C" int freeMemory();
114 114
 
115
-#if GCC_VERSION <= 50000
116
-  #pragma GCC diagnostic pop
117
-#endif
115
+#pragma GCC diagnostic pop
118 116
 
119 117
 // ADC
120 118
 

+ 2
- 4
Marlin/src/HAL/TEENSY40_41/HAL.h Просмотреть файл

@@ -125,16 +125,14 @@ void HAL_reboot();
125 125
 
126 126
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
127 127
 
128
+#pragma GCC diagnostic push
128 129
 #if GCC_VERSION <= 50000
129
-  #pragma GCC diagnostic push
130 130
   #pragma GCC diagnostic ignored "-Wunused-function"
131 131
 #endif
132 132
 
133 133
 extern "C" uint32_t freeMemory();
134 134
 
135
-#if GCC_VERSION <= 50000
136
-  #pragma GCC diagnostic pop
137
-#endif
135
+#pragma GCC diagnostic pop
138 136
 
139 137
 // ADC
140 138
 

+ 2
- 4
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Просмотреть файл

@@ -862,17 +862,15 @@ void MarlinUI::draw_status_screen() {
862 862
             mix_label = PSTR("Mx");
863 863
           }
864 864
 
865
+        #pragma GCC diagnostic push
865 866
         #if GCC_VERSION <= 50000
866
-          #pragma GCC diagnostic push
867 867
           #pragma GCC diagnostic ignored "-Wformat-overflow"
868 868
         #endif
869 869
 
870 870
         sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
871 871
         lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages);
872 872
 
873
-        #if GCC_VERSION <= 50000
874
-          #pragma GCC diagnostic pop
875
-        #endif
873
+        #pragma GCC diagnostic pop
876 874
 
877 875
       #else
878 876
 

+ 2
- 4
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp Просмотреть файл

@@ -27,8 +27,8 @@
27 27
 
28 28
 #define ROUND(val) uint16_t((val)+0.5)
29 29
 
30
+#pragma GCC diagnostic push
30 31
 #if GCC_VERSION <= 50000
31
-  #pragma GCC diagnostic push
32 32
   #pragma GCC diagnostic ignored "-Wno-format"
33 33
 #endif
34 34
 
@@ -105,8 +105,6 @@ void format_position(char *str, float x, float y, float z) {
105 105
   sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(MSG_UNITS_MM));
106 106
 }
107 107
 
108
-#if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic pop
110
-#endif
108
+#pragma GCC diagnostic pop
111 109
 
112 110
 #endif // TOUCH_UI_FTDI_EVE

+ 2
- 4
Marlin/src/libs/duration_t.h Просмотреть файл

@@ -106,8 +106,8 @@ struct duration_t {
106 106
     return this->value;
107 107
   }
108 108
 
109
+  #pragma GCC diagnostic push
109 110
   #if GCC_VERSION <= 50000
110
-    #pragma GCC diagnostic push
111 111
     #pragma GCC diagnostic ignored "-Wformat-overflow"
112 112
   #endif
113 113
 
@@ -170,7 +170,5 @@ struct duration_t {
170 170
     }
171 171
   }
172 172
 
173
-  #if GCC_VERSION <= 50000
174
-    #pragma GCC diagnostic pop
175
-  #endif
173
+  #pragma GCC diagnostic pop
176 174
 };

+ 2
- 4
Marlin/src/module/endstops.cpp Просмотреть файл

@@ -478,8 +478,8 @@ void Endstops::event_handler() {
478 478
   }
479 479
 }
480 480
 
481
+#pragma GCC diagnostic push
481 482
 #if GCC_VERSION <= 50000
482
-  #pragma GCC diagnostic push
483 483
   #pragma GCC diagnostic ignored "-Wunused-function"
484 484
 #endif
485 485
 
@@ -489,9 +489,7 @@ static void print_es_state(const bool is_hit, FSTR_P const flabel=nullptr) {
489 489
   SERIAL_ECHOLNF(is_hit ? F(STR_ENDSTOP_HIT) : F(STR_ENDSTOP_OPEN));
490 490
 }
491 491
 
492
-#if GCC_VERSION <= 50000
493
-  #pragma GCC diagnostic pop
494
-#endif
492
+#pragma GCC diagnostic pop
495 493
 
496 494
 void _O2 Endstops::report_states() {
497 495
   TERN_(BLTOUCH, bltouch._set_SW_mode());

Загрузка…
Отмена
Сохранить