Skip to content

fix: silence -Wunused-local-typedef and -Wunused-variable in four examples#512

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/example-unused-warnings
Open

fix: silence -Wunused-local-typedef and -Wunused-variable in four examples#512
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/example-unused-warnings

Conversation

@Becheler

Copy link
Copy Markdown
Collaborator

Refs #496

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

Silence -Wunused-local-typedef and -Wunused-variable in four examples (clears 7 warnings/job on both clang and gcc, example-only, no behavioral change).

  • graph-assoc-types.cpp: kept the illustrative associated-type typedefs but marked them with boost::ignore_unused<>() (portable across C++14, not [[maybe_unused]]).
  • quick-tour.cpp: removed the dead iter_t typedef (the loop uses auto).
  • minimum_degree_ordering.cpp: removed the unused Nrhs variable.
  • two_graphs_common_spanning_trees.cpp: added (void) vec; in the placeholder loop body.

Motivation

Refs #496

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@Becheler Becheler self-assigned this Jun 22, 2026
@Becheler Becheler requested a review from jeremy-murphy as a code owner June 22, 2026 11:25
@Becheler Becheler changed the title Silence -Wunused-local-typedef and -Wunused-variable in four examples fix: silence -Wunused-local-typedef and -Wunused-variable in four examples Jun 22, 2026
@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 27949206924 vs develop run 27866501982 (30013adff1).

Job Baseline After Delta
macos (clang, 14) 46 39 -7
macos (clang, 17) 41 34 -7
macos (clang, 20) 41 34 -7
ubuntu (clang-19, 14) 46 39 -7
ubuntu (clang-19, 17) 46 39 -7
ubuntu (clang-19, 20) 46 39 -7
ubuntu (clang-19, 23) 46 39 -7
ubuntu (gcc-14, 14) 28 21 -7
ubuntu (gcc-14, 17) 28 21 -7
ubuntu (gcc-14, 20) 28 21 -7
ubuntu (gcc-14, 23) 28 21 -7
windows_msvc_14_3 (msvc-14.3) 974 971 -3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant