From 8eaea086038ca97ecf1d19f7b3c1bc6f3cd2310f Mon Sep 17 00:00:00 2001 From: Patrick Grawehr Date: Sun, 6 Nov 2022 20:04:55 +0100 Subject: [PATCH] Fix a compiler warning --- src/utility/OneWire.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utility/OneWire.cpp b/src/utility/OneWire.cpp index cf349338..cce0de9d 100755 --- a/src/utility/OneWire.cpp +++ b/src/utility/OneWire.cpp @@ -166,6 +166,7 @@ uint8_t OneWire::reset(void) r = !DIRECT_READ(reg, mask); interrupts(); delayMicroseconds(410); + reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode return r; } @@ -195,6 +196,7 @@ void OneWire::write_bit(uint8_t v) interrupts(); delayMicroseconds(5); } + reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode } // @@ -216,6 +218,7 @@ uint8_t OneWire::read_bit(void) r = DIRECT_READ(reg, mask); interrupts(); delayMicroseconds(53); + reg = reg; // Avoid Warning on unused variable when compiling in compatibility mode return r; }