1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 05:31:24 +01:00

Remove compiler warnings in Turnout.h

This commit is contained in:
Neil McKechnie 2021-08-21 00:34:28 +01:00
parent d8366f33c8
commit 071389a04b

View File

@ -126,7 +126,9 @@ public:
/* /*
* Virtual functions * Virtual functions
*/ */
virtual void print(Print *stream) {} virtual void print(Print *stream) {
(void)stream; // avoid compiler warnings.
}
virtual ~Turnout() {} // Destructor virtual ~Turnout() {} // Destructor
/* /*
@ -240,6 +242,8 @@ public:
IODevice::writeAnalogue(vpin, closed ? closedPosition : thrownPosition, PCA9685::Instant); IODevice::writeAnalogue(vpin, closed ? closedPosition : thrownPosition, PCA9685::Instant);
return tt; return tt;
#else #else
(void)id; (void)vpin; (void)thrownPosition; (void)closedPosition;
(void)profile; (void)closed; // avoid compiler warnings.
return NULL; return NULL;
#endif #endif
} }
@ -250,6 +254,8 @@ public:
IODevice::writeAnalogue(_servoTurnoutData.vpin, IODevice::writeAnalogue(_servoTurnoutData.vpin,
close ? _servoTurnoutData.closedPosition : _servoTurnoutData.thrownPosition, _servoTurnoutData.profile); close ? _servoTurnoutData.closedPosition : _servoTurnoutData.thrownPosition, _servoTurnoutData.profile);
_turnoutData.closed = close; _turnoutData.closed = close;
#else
(void)close; // avoid compiler warnings
#endif #endif
return true; return true;
} }