MSVC warnings in environment.hpp and default_launcher.hpp
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
从报告中提到的两个文件开始:v2/environment.hpp 第 1504 行附近,其中 pathext 循环再次声明了 p,遮蔽了外层局部变量;以及 v2/windows/default_launcher.hpp 第 397 行附近,其中 build_command_line_impl 接收了一个未使用的参数 args。使用 MSVC 构建以复现警告 C4456 和 C4100。当两个警告都消失,且 Windows 测试在不改变行为的情况下仍然通过时,即完成。
由索引模型根据 Issue 内容生成。
描述
The first one is: "v2\environment.hpp(1504,18): warning C4456: declaration of 'p' hides previous local declaration"
In this code:
for (auto ext : pathext)
{
ec.clear();
BOOST_PROCESS_V2_NAMESPACE::filesystem::path nm(name);
nm.concat(ext.begin(), ext.end());
auto p = pp / nm;
if (detail::is_executable(p, ec) && !ec)
return p;
}
Should be probably changed to p = pp / nm;
The second one is on 2 lines (371, 397), showing only one as they are essentially the same: "v2\windows\default_launcher.hpp(397,39): warning C4100: 'args': unreferenced parameter"
In this code:
template<typename Argv>
static std::wstring build_command_line_impl(
const filesystem::path & pt,
const Argv & argv,
basic_string_view<char> args)
Commenting out the parameter should fix the warning.
- 主要语言
- C++
- 星标
- 145
- 派生
- 152
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
boostorg/process 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 68/100
-
v2: BOOST_PROCESS_V2_DISABLE_SIGNALSET does not compile with the signal-based process handle可能已有人在做 @kislinsk 于 6 天前认领。 未关闭
难度 3/5 半天 新手友好度 62/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA-Omniverse/usd-brep#23 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
qbittorrent/qBittorrent#25121 ·
维护者通常 2 天内回复
-
SVT-AV1: Unnecessary size padding可能已有人在做 @pszemus 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
strukturag/libheif#1945 ·
维护者通常 1 天内回复
-
v9.6.0: CMake incorrectly enforces presence of libevdev可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
mltframework/shotcut#1943 ·
维护者通常 1 天内回复