Fix Zigbee compilation warning in Berry mapping (#24333)

This commit is contained in:
s-hadinger
2026-01-12 18:31:10 +01:00
committed by GitHub
parent 661fe89435
commit 587cc4b5e9
2 changed files with 2 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file.
- GDK101 power on detection (#24242)
- Udisplay backlight with SPI displays (#24277)
- ESP8266 KNX unwanted reply (#24267)
- Zigbee compilation warning in Berry mapping
### Removed

View File

@@ -361,7 +361,7 @@ extern "C" {
void zfn_set_bytes(void* sbuf_ptr, const uint8_t* bytes, size_t len_bytes) {
if (sbuf_ptr == NULL || bytes == NULL) { return; }
SBuffer &sbuf = (SBuffer&) sbuf_ptr;
SBuffer& sbuf = *reinterpret_cast<SBuffer*>(sbuf_ptr); // Cast pointer first, then dereference
sbuf.reserve(len_bytes); // make sure it's large enough
sbuf.setLen(0); // clear content