From 38fea5dfe32a93ce09cd271df03bfe8fb2407c9e Mon Sep 17 00:00:00 2001 From: RobertoHE Date: Wed, 28 Dec 2022 18:16:21 +0100 Subject: [PATCH] Add lines to avoid warning about unused var When using a template instance in two different ways (for example, different settings struct for differents objects), a lot of lines of warning appear due to some variables being unused. Using these lines, those variables are used for doing nothing and the warnings go away. --- src/BLEMIDI_Transport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BLEMIDI_Transport.h b/src/BLEMIDI_Transport.h index d37d943..e84e7ad 100644 --- a/src/BLEMIDI_Transport.h +++ b/src/BLEMIDI_Transport.h @@ -256,10 +256,10 @@ public: byte headerByte = buffer[lPtr++]; auto timestampHigh = 0x3f & headerByte; - + timestampHigh = timestampHigh; // <-- This line is for avoid Warning message due it is unused byte timestampByte = buffer[lPtr++]; uint16_t timestamp = 0; - + timestamp = timestamp; // <-- This line is for avoid Warning message due it is unused bool sysExContinuation = false; bool runningStatusContinuation = false;