MSVC warnings in environment.hpp and default_launcher.hpp
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start with the two files named in the report: v2/environment.hpp near line 1504, where the loop over pathext declares p again and hides an outer local, and v2/windows/default_launcher.hpp near line 397, where build_command_line_impl takes an unused args parameter. Build on MSVC to reproduce warnings C4456 and C4100. Done when both warnings are gone and the Windows tests still pass without behavior changes.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 147
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/process
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in boostorg/process
Similar issues
-
agent:WSL code-review linux pri:medium refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
psi29a/d2decomped#691 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CachyOS/packageinstaller#144 ·
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#89715 ·
Maintainers usually reply within 1 day