From 071389a04b4d9abba92d58d3770da4af7ef63382 Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Sat, 21 Aug 2021 00:34:28 +0100 Subject: [PATCH] Remove compiler warnings in Turnout.h --- Turnouts.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Turnouts.h b/Turnouts.h index 5ab7b07..258c6d8 100644 --- a/Turnouts.h +++ b/Turnouts.h @@ -126,7 +126,9 @@ public: /* * Virtual functions */ - virtual void print(Print *stream) {} + virtual void print(Print *stream) { + (void)stream; // avoid compiler warnings. + } virtual ~Turnout() {} // Destructor /* @@ -240,6 +242,8 @@ public: IODevice::writeAnalogue(vpin, closed ? closedPosition : thrownPosition, PCA9685::Instant); return tt; #else + (void)id; (void)vpin; (void)thrownPosition; (void)closedPosition; + (void)profile; (void)closed; // avoid compiler warnings. return NULL; #endif } @@ -250,6 +254,8 @@ public: IODevice::writeAnalogue(_servoTurnoutData.vpin, close ? _servoTurnoutData.closedPosition : _servoTurnoutData.thrownPosition, _servoTurnoutData.profile); _turnoutData.closed = close; +#else + (void)close; // avoid compiler warnings #endif return true; }