Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMas-Day-2: Selector block: fix sign-conversion warnings & minor cleanup #491

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

RalphSteinhagen
Copy link
Member

On the second day of Christmas ๐ŸŽ„ ๐Ÿ‘ผ 2๏ธโƒฃ ๐ŸŽ„ , my code base gave to me...

A selector block with sign fixes galore โ€” or at least three

This PR primarily removes GCC/Clang sign-conversion warnings by explicitly casting from std::size_t to std::ptrdiff_t where needed. Otherwise, no major new features -- just a small patch compatible with the time after a โ€œChristmas induced food comaโ€ and to minimise compiler warnings ...

Did I mention that I love unit tests? Thanks to @drslebedev!

- explicitly cast sizes for std::copy_n and tag checks
- use single-step wrap for negative tag index checks

Signed-off-by: Ralph J. Steinhagen <[email protected]>
@RalphSteinhagen RalphSteinhagen force-pushed the fix-selector-block-warnings branch from c733b9e to 0a75ca7 Compare December 25, 2024 17:26
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
27.2% Coverage on New Code (required โ‰ฅ 80%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@drslebedev drslebedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

LGTM and can be merged.

@RalphSteinhagen RalphSteinhagen merged commit ebb8c2c into main Jan 2, 2025
12 of 14 checks passed
@RalphSteinhagen RalphSteinhagen deleted the fix-selector-block-warnings branch January 2, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants