matthias-bs / BresserWeatherSensorTTN

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver based on ESP32 and RFM95W/SX1276 - sends data to a LoRaWAN Network (e.g. The Things Network)
MIT License
22 stars 9 forks source link

Unused variable in OneWire #7

Closed matthias-bs closed 1 year ago

matthias-bs commented 1 year ago

An unused variable in OneWire causes the CI to fail:

/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::reset()':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:167:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:201:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::read_bit()':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:229:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
cc1plus: some warnings being treated as errors

As a workaround ONEWIRE_EN is disabled in BresserWeatherSensorTTNCfg.h.

matthias-bs commented 1 year ago

Proposed fix: https://github.com/PaulStoffregen/OneWire/pull/118

matthias-bs commented 1 year ago

Replaced OneWire by OneWireNg as proposed by @uzi18.