ArkScript-lang / ArkScript-lang/Ark

timestamp unused

オープン
#339 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
❗️ priority/medium 🔥 bug 🤔 help wanted
主要言語
C++
スター
728
フォーク
54
平均マージ
4時間 8分
マージ済み PR(30日)
2

説明

**Describe the bug**

On Linux GCC Compiler we get the following warning:

[ 37%] Building CXX object CMakeFiles/ArkReactor.dir/src/arkreactor/VM/State.cpp.o
/home/runner/work/Ark/Ark/src/arkreactor/VM/State.cpp: In member function ‘void Ark::State::configure()’:
/home/runner/work/Ark/Ark/src/arkreactor/VM/State.cpp:236:21: error: variable ‘timestamp’ set but not used [-Werror=unused-but-set-variable]
236 | timestamp_t timestamp = 0;
| ^~~~~~~~~


**To Reproduce**
Compile on Linux using GCC

**Expected behavior**
There is some effort put into calculating the value of `timestamp` (see line 246).
So it looks like it should be used.

**Additional context**
This should be fixed or the variable removed.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

src/arkreactor/VM/State.cpp を開いて State::configure() を調べます。特に、236 行付近の timestamp の宣言と、246 行付近のその計算を確認します。Linux GCC のビルドを再現して unused-but-set 警告を確認し、その後 timestamp を使用すべきか削除すべきかを判断します。この警告なしでビルドが完了すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
compilers
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。