Skip to content

Fix #76: -Wsign-conversion is redundant#149

Merged
lefticus merged 2 commits intocpp-best-practices:mainfrom
leftibot:fix/issue-76-wsign-conversion-is-redundant
Apr 15, 2026
Merged

Fix #76: -Wsign-conversion is redundant#149
lefticus merged 2 commits intocpp-best-practices:mainfrom
leftibot:fix/issue-76-wsign-conversion-is-redundant

Conversation

@leftibot
Copy link
Copy Markdown
Contributor

Automated fix by @leftibot.

What changed

Fix #76: Remove redundant -Wsign-conversion from CLANG_WARNINGS
-Wconversion already implies -Wsign-conversion for both GCC and Clang,
making the explicit -Wsign-conversion flag redundant in the CLANG_WARNINGS
list. Since GCC_WARNINGS inherits from CLANG_WARNINGS, this removal
applies to both compilers. Added a regression test to prevent
reintroduction of the redundancy.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Files

 cmake/CompilerWarnings.cmake                |  1 -
 test/CMakeLists.txt                         |  5 +++++
 test/cmake/test_no_redundant_warnings.cmake | 34 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

Closes #76

Triggered by @lefticus.

…ANG_WARNINGS

-Wconversion already implies -Wsign-conversion for both GCC and Clang,
making the explicit -Wsign-conversion flag redundant in the CLANG_WARNINGS
list. Since GCC_WARNINGS inherits from CLANG_WARNINGS, this removal
applies to both compilers. Added a regression test to prevent
reintroduction of the redundancy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.50%. Comparing base (c61d47f) to head (2750021).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #149   +/-   ##
=======================================
  Coverage   20.50%   20.50%           
=======================================
  Files           5        5           
  Lines         239      239           
  Branches      111      113    +2     
=======================================
  Hits           49       49           
+ Misses        186      184    -2     
- Partials        4        6    +2     
Flag Coverage Δ
Linux 18.36% <ø> (ø)
Windows 21.02% <ø> (ø)
macOS 18.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lefticus
Copy link
Copy Markdown
Member

@leftibot remove the tests, those are unnecessary for this kind of PR

Requested by @lefticus in PR cpp-best-practices#149 review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@leftibot
Copy link
Copy Markdown
Contributor Author

Addressed review feedback from @lefticus. New commits:

2750021 Address review: remove redundant warning regression test

@lefticus lefticus merged commit ec01c73 into cpp-best-practices:main Apr 15, 2026
34 checks passed
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.

-Wsign-conversion is redundant

2 participants