Browse Source

🎨 Pragma GCC cleanup

Scott Lahteine 3 years ago
parent
commit
1f3f9cb68c

+ 2
- 4
Marlin/src/HAL/AVR/HAL.h View File

157
 
157
 
158
 void HAL_reboot();
158
 void HAL_reboot();
159
 
159
 
160
+#pragma GCC diagnostic push
160
 #if GCC_VERSION <= 50000
161
 #if GCC_VERSION <= 50000
161
-  #pragma GCC diagnostic push
162
   #pragma GCC diagnostic ignored "-Wunused-function"
162
   #pragma GCC diagnostic ignored "-Wunused-function"
163
 #endif
163
 #endif
164
 
164
 
165
 extern "C" int freeMemory();
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
 // ADC
169
 // ADC
172
 #ifdef DIDR2
170
 #ifdef DIDR2

+ 2
- 4
Marlin/src/HAL/DUE/HAL.h View File

168
 //
168
 //
169
 void _delay_ms(const int delay);
169
 void _delay_ms(const int delay);
170
 
170
 
171
+#pragma GCC diagnostic push
171
 #if GCC_VERSION <= 50000
172
 #if GCC_VERSION <= 50000
172
-  #pragma GCC diagnostic push
173
   #pragma GCC diagnostic ignored "-Wunused-function"
173
   #pragma GCC diagnostic ignored "-Wunused-function"
174
 #endif
174
 #endif
175
 
175
 
176
 int freeMemory();
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
 #ifdef __cplusplus
180
 #ifdef __cplusplus
183
   extern "C" {
181
   extern "C" {

+ 2
- 4
Marlin/src/HAL/ESP32/HAL.h View File

105
 
105
 
106
 void _delay_ms(int delay);
106
 void _delay_ms(int delay);
107
 
107
 
108
+#pragma GCC diagnostic push
108
 #if GCC_VERSION <= 50000
109
 #if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic push
110
   #pragma GCC diagnostic ignored "-Wunused-function"
110
   #pragma GCC diagnostic ignored "-Wunused-function"
111
 #endif
111
 #endif
112
 
112
 
113
 int freeMemory();
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
 void analogWrite(pin_t pin, int value);
117
 void analogWrite(pin_t pin, int value);
120
 
118
 

+ 2
- 4
Marlin/src/HAL/LINUX/HAL.h View File

79
 inline void HAL_init() {}
79
 inline void HAL_init() {}
80
 
80
 
81
 // Utility functions
81
 // Utility functions
82
+#pragma GCC diagnostic push
82
 #if GCC_VERSION <= 50000
83
 #if GCC_VERSION <= 50000
83
-  #pragma GCC diagnostic push
84
   #pragma GCC diagnostic ignored "-Wunused-function"
84
   #pragma GCC diagnostic ignored "-Wunused-function"
85
 #endif
85
 #endif
86
 
86
 
87
 int freeMemory();
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
 // ADC
91
 // ADC
94
 #define HAL_ADC_VREF           5.0
92
 #define HAL_ADC_VREF           5.0

+ 2
- 4
Marlin/src/HAL/LPC1768/HAL.h View File

123
 //
123
 //
124
 // Utility functions
124
 // Utility functions
125
 //
125
 //
126
+#pragma GCC diagnostic push
126
 #if GCC_VERSION <= 50000
127
 #if GCC_VERSION <= 50000
127
-  #pragma GCC diagnostic push
128
   #pragma GCC diagnostic ignored "-Wunused-function"
128
   #pragma GCC diagnostic ignored "-Wunused-function"
129
 #endif
129
 #endif
130
 
130
 
131
 int freeMemory();
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
 // ADC API
136
 // ADC API

+ 2
- 4
Marlin/src/HAL/SAMD51/HAL.h View File

153
 //
153
 //
154
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
154
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
155
 
155
 
156
+#pragma GCC diagnostic push
156
 #if GCC_VERSION <= 50000
157
 #if GCC_VERSION <= 50000
157
-  #pragma GCC diagnostic push
158
   #pragma GCC diagnostic ignored "-Wunused-function"
158
   #pragma GCC diagnostic ignored "-Wunused-function"
159
 #endif
159
 #endif
160
 
160
 
161
 int freeMemory();
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
 #ifdef __cplusplus
165
 #ifdef __cplusplus
168
   extern "C" {
166
   extern "C" {

+ 2
- 4
Marlin/src/HAL/TEENSY31_32/HAL.h View File

98
 
98
 
99
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
99
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
100
 
100
 
101
+#pragma GCC diagnostic push
101
 #if GCC_VERSION <= 50000
102
 #if GCC_VERSION <= 50000
102
-  #pragma GCC diagnostic push
103
   #pragma GCC diagnostic ignored "-Wunused-function"
103
   #pragma GCC diagnostic ignored "-Wunused-function"
104
 #endif
104
 #endif
105
 
105
 
106
 extern "C" int freeMemory();
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
 // ADC
110
 // ADC
113
 
111
 

+ 2
- 4
Marlin/src/HAL/TEENSY35_36/HAL.h View File

105
 
105
 
106
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
106
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
107
 
107
 
108
+#pragma GCC diagnostic push
108
 #if GCC_VERSION <= 50000
109
 #if GCC_VERSION <= 50000
109
-  #pragma GCC diagnostic push
110
   #pragma GCC diagnostic ignored "-Wunused-function"
110
   #pragma GCC diagnostic ignored "-Wunused-function"
111
 #endif
111
 #endif
112
 
112
 
113
 extern "C" int freeMemory();
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
 // ADC
117
 // ADC
120
 
118
 

+ 2
- 4
Marlin/src/HAL/TEENSY40_41/HAL.h View File

125
 
125
 
126
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
126
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
127
 
127
 
128
+#pragma GCC diagnostic push
128
 #if GCC_VERSION <= 50000
129
 #if GCC_VERSION <= 50000
129
-  #pragma GCC diagnostic push
130
   #pragma GCC diagnostic ignored "-Wunused-function"
130
   #pragma GCC diagnostic ignored "-Wunused-function"
131
 #endif
131
 #endif
132
 
132
 
133
 extern "C" uint32_t freeMemory();
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
 // ADC
137
 // ADC
140
 
138
 

+ 2
- 4
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

862
             mix_label = PSTR("Mx");
862
             mix_label = PSTR("Mx");
863
           }
863
           }
864
 
864
 
865
+        #pragma GCC diagnostic push
865
         #if GCC_VERSION <= 50000
866
         #if GCC_VERSION <= 50000
866
-          #pragma GCC diagnostic push
867
           #pragma GCC diagnostic ignored "-Wformat-overflow"
867
           #pragma GCC diagnostic ignored "-Wformat-overflow"
868
         #endif
868
         #endif
869
 
869
 
870
         sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
870
         sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
871
         lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages);
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
       #else
875
       #else
878
 
876
 

+ 2
- 4
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp View File

27
 
27
 
28
 #define ROUND(val) uint16_t((val)+0.5)
28
 #define ROUND(val) uint16_t((val)+0.5)
29
 
29
 
30
+#pragma GCC diagnostic push
30
 #if GCC_VERSION <= 50000
31
 #if GCC_VERSION <= 50000
31
-  #pragma GCC diagnostic push
32
   #pragma GCC diagnostic ignored "-Wno-format"
32
   #pragma GCC diagnostic ignored "-Wno-format"
33
 #endif
33
 #endif
34
 
34
 
105
   sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(MSG_UNITS_MM));
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
 #endif // TOUCH_UI_FTDI_EVE
110
 #endif // TOUCH_UI_FTDI_EVE

+ 2
- 4
Marlin/src/libs/duration_t.h View File

106
     return this->value;
106
     return this->value;
107
   }
107
   }
108
 
108
 
109
+  #pragma GCC diagnostic push
109
   #if GCC_VERSION <= 50000
110
   #if GCC_VERSION <= 50000
110
-    #pragma GCC diagnostic push
111
     #pragma GCC diagnostic ignored "-Wformat-overflow"
111
     #pragma GCC diagnostic ignored "-Wformat-overflow"
112
   #endif
112
   #endif
113
 
113
 
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 View File

478
   }
478
   }
479
 }
479
 }
480
 
480
 
481
+#pragma GCC diagnostic push
481
 #if GCC_VERSION <= 50000
482
 #if GCC_VERSION <= 50000
482
-  #pragma GCC diagnostic push
483
   #pragma GCC diagnostic ignored "-Wunused-function"
483
   #pragma GCC diagnostic ignored "-Wunused-function"
484
 #endif
484
 #endif
485
 
485
 
489
   SERIAL_ECHOLNF(is_hit ? F(STR_ENDSTOP_HIT) : F(STR_ENDSTOP_OPEN));
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
 void _O2 Endstops::report_states() {
494
 void _O2 Endstops::report_states() {
497
   TERN_(BLTOUCH, bltouch._set_SW_mode());
495
   TERN_(BLTOUCH, bltouch._set_SW_mode());

Loading…
Cancel
Save