Fix GCC compiler warnings - #250
Merged
Merged
Conversation
…s, maybe-uninitialized, comment, unused-but-set-variable) - barrier.cpp, edge_edge_mollifier.hpp, normal.cpp: qualify log/fma as std:: (unqualified calls were resolving to the double-only C overload, narrowing when T=float) and template chain_rule as T instead of double. - lbvh.cpp: guard #pragma unroll behind __clang__/__GNUC__ so GCC uses #pragma GCC unroll instead of ignoring an unrecognized pragma. - test_angle.cpp: initialize expected_angle to silence a false positive across Catch2 SECTIONs. - test_trust_region.cpp: fix a stray backslash that spliced an ASCII-art comment across lines, and drop unused ci/xi/dxi locals. - utils.cpp: simplify a redundant double() cast in a tolerance calc. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GCC has a long-standing history of false positives on inlined Eigen expression-template code (gcc.gnu.org/PR94867, seen from GCC 8 through at least GCC 14), which is what produced several of the null-deref warnings fixed earlier on this branch. Rather than suppress each callsite individually, only request the flag when the compiler isn't GCC. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
=======================================
Coverage 96.41% 96.41%
=======================================
Files 179 179
Lines 16808 16808
Branches 962 962
=======================================
Hits 16205 16205
Misses 603 603
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Test plan
make -j$(nproc) -Binbuild/release: 0 warnings, 0 errorsipc_toolkit_testsandipctk(python bindings) both build successfully🤖 Generated with Claude Code