@@ -189,10 +189,10 @@ inline long map(long x, long in_min, long in_max, long out_min, long out_max) {
189189}
190190
191191// LEDC stubs
192- inline void ledcSetup (int ch, int freq, int res) {}
193- inline void ledcAttachPin (int pin, int ch) {}
194- inline void ledcWrite (int ch, int duty) {}
195- inline void ledcDetachPin (int pin) {}
192+ inline void ledcSetup (int ch, int freq, int res) { ( void )ch; ( void )freq; ( void )res; }
193+ inline void ledcAttachPin (int pin, int ch) { ( void )pin; ( void )ch; }
194+ inline void ledcWrite (int ch, int duty) { ( void )ch; ( void )duty; }
195+ inline void ledcDetachPin (int pin) { ( void )pin; }
196196
197197// ── Timing ─────────────────────────────────────────────────────────────
198198
@@ -206,7 +206,7 @@ inline unsigned long pulseIn(int pin, int state, unsigned long timeout = 1000000
206206
207207// ── Random ─────────────────────────────────────────────────────────────
208208
209- inline void randomSeed (unsigned long seed) {}
209+ inline void randomSeed (unsigned long seed) { ( void )seed; }
210210inline long random (long max) { return rand () % max; }
211211inline long random (long min, long max) { return min + rand () % (max - min); }
212212
@@ -226,6 +226,7 @@ inline std::map<int, std::function<void()>>& _mockInterruptHandlers() {
226226}
227227
228228inline void attachInterrupt (int pin, void (*isr)(), int mode) {
229+ (void )mode;
229230 _mockInterruptHandlers ()[pin] = isr;
230231}
231232
@@ -280,20 +281,20 @@ struct HardwareSerial {
280281 size_t _rxPos = 0 ;
281282 unsigned long _timeout = 1000 ;
282283
283- void begin (long baud ) { (void )baud ; }
284- void begin (long baud , int config, int rxPin, int txPin) { (void )baud ; (void )config; (void )rxPin; (void )txPin; }
284+ void begin (long baud_ ) { (void )baud_ ; }
285+ void begin (long baud_ , int config, int rxPin, int txPin) { (void )baud_ ; (void )config; (void )rxPin; (void )txPin; }
285286 void end () {}
286287 void setTimeout (unsigned long t) { _timeout = t; }
287288 int available () { return (int )(_rxBuffer.size () - _rxPos); }
288289 int read () {
289290 if (_rxPos < _rxBuffer.size ()) return (unsigned char )_rxBuffer[_rxPos++];
290291 return -1 ;
291292 }
292- size_t write (uint8_t b ) { (void )b ; return 1 ; }
293+ size_t write (uint8_t b_ ) { (void )b_ ; return 1 ; }
293294 size_t print (const String& s) { return s.length (); }
294295 size_t print (const char * s) { return strlen (s); }
295296 template <typename ... Args>
296- void printf (const char * fmt, Args... args) { (void )fmt; }
297+ void printf (const char * fmt, Args... args) { (void )fmt; (( void )args, ...); }
297298
298299 // Test helper
299300 void _setRxBuffer (const std::string& data) { _rxBuffer = data; _rxPos = 0 ; }
@@ -305,7 +306,7 @@ inline HardwareSerial Serial2;
305306// ── Serial Mock ────────────────────────────────────────────────────────
306307
307308struct SerialMock {
308- void begin (int baud) {}
309+ void begin (int baud) { ( void )baud; }
309310 void print (const char * s) { fprintf (stderr, " %s" , s); }
310311 void print (const String& s) { fprintf (stderr, " %s" , s.c_str ()); }
311312 void println (const char * s = " " ) { fprintf (stderr, " %s\n " , s); }
@@ -359,8 +360,8 @@ struct WiFiMock {
359360 int channel (int i) { return 1 + (i % 11 ); }
360361 int scanNetworks () { return 3 ; }
361362 void scanDelete () {}
362- int encryptionType (int i) { return 4 ; }
363- void begin (const char * ssid, const char * pass) {}
363+ int encryptionType (int i) { ( void )i; return 4 ; }
364+ void begin (const char * ssid, const char * pass) { ( void )ssid; ( void )pass; }
364365};
365366inline WiFiMock WiFi;
366367
@@ -396,12 +397,10 @@ class WiFiClient {
396397
397398class WiFiServer {
398399public:
399- WiFiServer (uint16_t port) : _port(port) { }
400+ WiFiServer (uint16_t port) { ( void )port; }
400401 void begin () {}
401402 void stop () {}
402403 WiFiClient available () { return WiFiClient (); }
403- private:
404- uint16_t _port;
405404};
406405
407406// ── WebServer Mock ─────────────────────────────────────────────────────
@@ -442,7 +441,7 @@ class WebServer {
442441
443442 WiFiClient client () { return WiFiClient (); }
444443
445- void collectHeaders (const char ** headers, int count) {}
444+ void collectHeaders (const char ** headers, int count) { ( void )headers; ( void )count; }
446445
447446 String arg (const char * name) {
448447 if (strcmp (name, " plain" ) == 0 ) return _body;
@@ -486,9 +485,9 @@ class WebServer {
486485// ── mDNS Mock ──────────────────────────────────────────────────────────
487486
488487struct MDNSMock {
489- bool begin (const char * name) { return true ; }
490- void addService (const char * service, const char * proto, uint16_t port) {}
491- void addServiceTxt (const char * service, const char * proto, const char * key, const char * value) {}
488+ bool begin (const char * name) { ( void )name; return true ; }
489+ void addService (const char * service, const char * proto, uint16_t port) { ( void )service; ( void )proto; ( void )port; }
490+ void addServiceTxt (const char * service, const char * proto, const char * key, const char * value) { ( void )service; ( void )proto; ( void )key; ( void )value; }
492491};
493492inline MDNSMock MDNS;
494493
@@ -497,12 +496,12 @@ inline MDNSMock MDNS;
497496class TwoWire {
498497public:
499498 void begin () {}
500- void beginTransmission (uint8_t addr) {}
499+ void beginTransmission (uint8_t addr) { ( void )addr; }
501500 uint8_t endTransmission () { return 0 ; }
502- uint8_t requestFrom (uint8_t addr, uint8_t count) { return count; }
501+ uint8_t requestFrom (uint8_t addr, uint8_t count) { ( void )addr; return count; }
503502 int available () { return 0 ; }
504503 int read () { return 0 ; }
505- void write (uint8_t b) {}
504+ void write (uint8_t b) { ( void )b; }
506505};
507506inline TwoWire Wire;
508507
0 commit comments