arduino / ArduinoCore-API

Hardware independent layer of the Arduino cores defining the official API
https://www.arduino.cc/reference/en/
GNU Lesser General Public License v2.1
215 stars 119 forks source link

Use itoa from samd core to replace use of deprecated sprintf call #211

Open jboynes opened 1 year ago

jboynes commented 1 year ago

Rather than rely on sprintf or something like it, use a known implemenation of itoa.

This replaces the file with the implementation from ArduinoCore-samd which I hope avoids any licensing concerns.

There's a couple of warnings from CLang-tidy because it's now C++ rather than C but I wanted to add a straight copy to make review easier. I will submit a different PR to fix those.

jboynes commented 1 year ago

Tests failed on the first run due to an issue trying to upload coverage results.

I couldn't figure out how to redrive the action so opted to push another commit containing the Clang-tidy cleanup.