Repository navigation
test: Compare video tick edges by their enum names - #2451
Merged
Merged
Conversation
MSVC (warning C5287 as error) rejects comparing the edge with the test's unnamed-enum aliases. Use OBS_SOURCE_VIDEO_TICK_EDGE_ON and _OFF directly. Refs obs-rust#2443
4 of 7 tasks
Member
|
Coordinator review: a compile-only fix for MSVC C5287 under -WX. It names the enum constants instead of the unnamed-enum aliases, so the condition and every assertion are unchanged. This test came from #2448 a few hours ago, and it blocks Windows Tier 2 for every PR that builds cmocka (#2450 included). Queuing. |
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.
Refs #2443
What and why
The steps test from #2448 (the video tick port) doesn't build on Windows. MSVC raises warning C5287, which is an error under
-WX, attest/cmocka/test_source_video_tick_steps.c:237. That line compares anenum obs_source_video_tick_edgewith the test's unnamed-enum aliasesON/OFF. It breaks the Windows Tier 2 build of any PR that builds the cmocka tests (seen on #2450).Change
Line 237 compares against
OBS_SOURCE_VIDEO_TICK_EDGE_ONandOBS_SOURCE_VIDEO_TICK_EDGE_OFFdirectly. No assertion changes. Theassert_int_equaluses of the aliases convert to integers and are fine.Testing
./lint: ok.