fix: C++17 compatibility — atomic<bool> stop, shadow fix, PID test vector#1
Merged
Conversation
…vector Replace std::stop_token/std::stop_source (C++20) with std::atomic<bool> in master node header, implementation and tests so the library builds clean under -std=c++17. Fix a variable-shadow warning in the RELAY adapter lambda capture and correct a wrong PID test vector for ID=0x10 (P0 = ID0^ID1^ID2^ID4 = 1, so PID = 0x50, not 0x10). Signed-off-by: Matt Jones <matt@jellybaby.com> Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
CTest passes test names as regex filters on Windows; the Unicode right arrow (U+2192) in the crc16 test name was silently replaced with '?' causing the filter to match nothing and the test to be reported as failed (no tests ran). Replace with ASCII '->'. Signed-off-by: Matt Jones <matt@jellybaby.com> Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
…orter arg The docker build step was looking for Dockerfile in repo root but it lives at docker/Dockerfile. Add -f flag to point at the correct path. Also remove --reporter compact from docker run; that is a Catch2 flag, not a ctest flag, and the container ENTRYPOINT is ctest. Signed-off-by: Matt Jones <matt@jellybaby.com> Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
std::stop_token/std::stop_source(C++20) withstd::atomic<bool>inlin::master::Node::run()— header, implementation, and all tests — so the library builds cleanly under-std=c++17-Wshadowwarning insrc/lin.cpp: lambda init-captureframes = std::move(frames)renamed toframe_chto avoid shadowing the outer structured bindingprotect_idtest vector:ID=0x10has bit4=1, so P0=1, PID=0x50 (not 0x10 as the comment incorrectly stated)Test plan
cmake -B build -G "Unix Makefiles"— configures clean under AppleClang 21 / C++17cmake --build build— zero errors, zero warningsctest --output-on-failure— 160/160 tests passRequirements traceability
REQ-MASTER-001..013— all master node requirements remain covered