From 3d502a41c5e3839d0c0a0a65e68bece7d476d500 Mon Sep 17 00:00:00 2001 From: Dominik Nussbaumer <4436784+tnixeu@users.noreply.github.com> Date: Sun, 23 Oct 2022 15:57:42 +0200 Subject: [PATCH] add static_cast in order to fix warnings (#2843) --- wled00/set.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/set.cpp b/wled00/set.cpp index 70700c320..9b58ef64a 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -503,7 +503,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) } else { // there is no Wire.end() DEBUG_PRINTLN(F("Could not allocate I2C pins.")); - uint8_t i2c[2] = { i2c_scl, i2c_sda }; + uint8_t i2c[2] = { static_cast(i2c_scl), static_cast(i2c_sda) }; pinManager.deallocateMultiplePins(i2c, 2, PinOwner::HW_I2C); // just in case deallocation of old pins i2c_sda = -1; i2c_scl = -1; @@ -532,7 +532,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) } else { //SPI.end(); DEBUG_PRINTLN(F("Could not allocate SPI pins.")); - uint8_t spi[3] = { spi_mosi, spi_miso, spi_sclk }; + uint8_t spi[3] = { static_cast(spi_mosi), static_cast(spi_miso), static_cast(spi_sclk) }; pinManager.deallocateMultiplePins(spi, 3, PinOwner::HW_SPI); // just in case deallocation of old pins spi_mosi = -1; spi_miso = -1;