Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wvla compiler warnings #109

Open
zfields opened this issue Jul 18, 2024 · 1 comment
Open

-Wvla compiler warnings #109

zfields opened this issue Jul 18, 2024 · 1 comment

Comments

@zfields
Copy link

zfields commented Jul 18, 2024

~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp: In member function 'int MqttClient::subscribe(const char*, uint8_t)':
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp:333:43: warning: variable length array 'packetBuffer' is used [-Wvla]
   uint8_t packetBuffer[5 + remainingLength];
                                           ^
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp: In member function 'int MqttClient::unsubscribe(const char*)':
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp:381:43: warning: variable length array 'packetBuffer' is used [-Wvla]
   uint8_t packetBuffer[5 + remainingLength];
                                           ^
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp: In member function 'int MqttClient::connect(arduino::IPAddress, const char*, uint16_t)':
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp:910:43: warning: variable length array 'packetBuffer' is used [-Wvla]
   uint8_t packetBuffer[5 + remainingLength];
                                           ^
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp: In member function 'int MqttClient::publishHeader(size_t)':
~/Development/Arduino/libraries/ArduinoMqttClient/src/MqttClient.cpp:982:46: warning: variable length array 'packetHeaderBuffer' is used [-Wvla]
   uint8_t packetHeaderBuffer[5 + headerLength];
                                              ^
@zfields
Copy link
Author

zfields commented Jul 18, 2024

arduino-cli compile --verbose --warnings=all --build-property "build.extra_flags=-Wno-unused-variable -Wno-implicit-fallthrough -Wno-psabi -Wno-deprecated-copy -Wno-missing-field-initializers -Wno-delete-non-virtual-dtor -Wno-sign-compare -Og -g" --fqbn arduino:mbed_opta:opta <dev folder>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant