timestamp unused

未关闭
#339 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
compilers

调研方向

打开 src/arkreactor/VM/State.cpp 并检查 State::configure(),尤其是第 236 行附近的时间戳声明及其在第 246 行附近的计算。复现 Linux GCC 构建以确认 unused-but-set 警告,然后确定是否应使用或删除该时间戳。构建在没有此警告的情况下完成即表示完成。

由索引模型根据 Issue 内容生成。

描述

❗️ priority/medium 🔥 bug 🤔 help wanted

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.

主要语言
C++
星标
729
派生
54
平均合并
4 小时 8 分钟
30 天内合并 PR
2

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ArkScript-lang/Ark 的其他 Issue

查看 ArkScript-lang/Ark 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。