Clean up use of sprintf
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 28/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- api, embedded-iot
調査の方向性
String と IPAddress の API 実装、およびテストスイートの itoa と dtostrf ヘルパーを特定します。まず既存の sprintf pragma と変換パスを確認します。抑制を削除し、特定された非推奨の sprintf 使用箇所に対処して、String、IPAddress、または String のテストを壊さなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
In #208 I added pragmas to suppress deprecation warnings related to sprintf that were added in newer versions of GCC and CLang, and which caused compilation failure. These suppressions should be removed.
One usage is in the test suite's implemention of itoa that is needed to run String tests. I have a quick fix for that relying on snprintf but I also thought of just using a more basic implementation of itoa such as the one from K&R or even just copying the implementation from the SAMD core.
Thinking a bit deeper though, the only use in API code is in String and it looks to be unnecessarily double buffering during those conversions. I think there's an opportunity to remove String's dependency on itoa and make it more efficient, which would also eliminate the need for an implementation of itoa in the test suite. I plan to look in to that approach.
A similar use is in the test suite's implementation of dtostrf which delegates the deprecated avr impl. For that, I think String can be improved to avoid the double buffering although it would still delegate to the core for the conversion, assuming the core may have implementation-specific FP support.
The final use was in IPAddress and that looks like it can simply be changed to used snprintf
- 主要言語
- C++
- スター
- 307
- フォーク
- 152
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
arduino/ArduinoCore-API のほかの issue
-
Bit manipulation not working with 64 bit values対応中かも @asumo-1xts が 36 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
arduino/ArduinoCore-API#261 ·
-
Missing virtual destructor for `Print` class対応中かも @andreagilardoni が 1104 日前に担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 30/100
arduino/ArduinoCore-API#256 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
arduino/ArduinoCore-API#251 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
arduino/ArduinoCore-API#250 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
arduino/ArduinoCore-API#249 ·
arduino/ArduinoCore-API の issue をすべて見る
似ている issue
-
Make Catch2 optional when `RDK_BUILD_CPP_TESTS=OFF`対応中かも @pechersky が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dice-group/dice-hash#111 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/libaddressinput#255 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
MerginMaps/mobile#4741 ·
メンテナーはふだん 1 日以内に返信