From b51b38776b229469c2f27ad07599c81e22f8513f Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Fri, 4 Sep 2026 14:09:50 +0200 Subject: [PATCH] Clean up compiler warnings from Apple clang. 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 : (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. --- include/boost/graph/stanford_graph.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/graph/stanford_graph.hpp b/include/boost/graph/stanford_graph.hpp index a3b949e61..83acf4c28 100644 --- a/include/boost/graph/stanford_graph.hpp +++ b/include/boost/graph/stanford_graph.hpp @@ -50,6 +50,7 @@ extern "C" #include /* graphs based on football scores */ #undef ap /* avoid name clash with BGL parameter */ // ap ==> Vertex::u.I +#undef MAX_N /* redefinition in gb_miles.h below; unused */ #include /* graphs based on logic circuits */ #undef val /* avoid name clash with g++ headerfile stl_tempbuf.h */ // val ==> Vertex::x.I @@ -401,26 +402,26 @@ class sgb_edge_util_map template < class Tag > inline sgb_vertex_util_map< Tag, const typename Tag::type& > get_property_map( - Tag, const sgb_graph_ptr& g, vertex_property_tag) + Tag, const sgb_graph_ptr&, vertex_property_tag) { return sgb_vertex_util_map< Tag, const typename Tag::type& >(); } template < class Tag > inline sgb_vertex_util_map< Tag, typename Tag::type& > get_property_map( - Tag, sgb_graph_ptr& g, vertex_property_tag) + Tag, sgb_graph_ptr&, vertex_property_tag) { return sgb_vertex_util_map< Tag, typename Tag::type& >(); } template < class Tag > inline sgb_edge_util_map< Tag, const typename Tag::type& > get_property_map( - Tag, const sgb_graph_ptr& g, edge_property_tag) + Tag, const sgb_graph_ptr&, edge_property_tag) { return sgb_edge_util_map< Tag, const typename Tag::type& >(); } template < class Tag > inline sgb_edge_util_map< Tag, typename Tag::type& > get_property_map( - Tag, sgb_graph_ptr& g, edge_property_tag) + Tag, sgb_graph_ptr&, edge_property_tag) { return sgb_edge_util_map< Tag, typename Tag::type& >(); }