arduino / arduino/ArduinoCore-mbed

`-Wvla` compiler warnings

Open
#925 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

```
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/SocketWrapper/src/MbedUdp.cpp: In member function 'virtual int arduino::MbedUDP::endPacket()':
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/SocketWrapper/src/MbedUdp.cpp:76:22: warning: variable length array 'buffer' is used [-Wvla]
uint8_t buffer[size];
^
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in libraries/SocketWrapper/src/MbedUdp.cpp at line 76, inside arduino::MbedUDP::endPacket(), where the compiler reports the variable-length buffer. Build the ArduinoCore-mbed code with -Wvla enabled and verify that the warning is eliminated without changing endPacket behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.