Clean up compiler warnings from Apple clang. - #589
Merged
Becheler merged 1 commit intoSep 4, 2026
Conversation
On macOS Tahoe 26.6.2 with MacOSX26.5.sdk: $ c++ --version Apple clang version 21.0.0 (clang-2100.1.1.101) In contrast to GCC 16, this compiler issues several warnings in <boost/stanford_graph.hpp>: (1) Redefinition of preprocessor item 'MAX_N' in 'gb_games.h' (120) and 'gb_miles.h' (128). Although neither of these values is actually used in the four SGB examples, we let the latter stand for 'miles_span.cpp'. (2) In four templates, parameter 'g' is not used.
|
Boost dependency footprint vs Header-inclusion weights (graph files pulling each direct dependency in): No header-inclusion-weight changes. Transitive Boost modules: 65 → 65 (0) |
|
Compiler-warning counts vs
|
Becheler
approved these changes
Sep 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 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.
Before submitting
developbranch.Might be of interest for issue State of warnings in CI
develop#496.Type of change
Does this PR introduce a breaking change?
What this PR does
Fixes compiler warnings in
boost/stanford_graph.hppissued by Apple clang version 21.0.0 (clang-2100.1.1.101).In contrast to GCC 16, this compiler issues several warnings in <boost/stanford_graph.hpp>:
Redefinition of preprocessor item
MAX_Ningb_games.h(120) andgb_miles.h(128). Although neither of these values is actually used in the four SGB examples, we let the latter stand formiles_span.cpp.In four templates, parameter
gis not used.Motivation
Conventionally, I like to treat compiler warnings as bugs. :o)
Testing
Checklist
b2in thetest/directory).