Skip to content

Clean up compiler warnings - #20

Merged
egull merged 1 commit into
masterfrom
source-warning-cleanup
Jun 3, 2026
Merged

Clean up compiler warnings#20
egull merged 1 commit into
masterfrom
source-warning-cleanup

Conversation

@egull

@egull egull commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove unused locals in sector statistics and NFFT measurement code
  • mark intentionally unused interface parameters explicitly
  • use size_t for vector-size loop counters
  • restore stream formatting state after writing acceptance statistics

Verification

  • git diff --check
  • Clean warning build was verified with -Wall -Wextra -Wpedantic using ALPSCore at /Users/egull/Projects/ALPSCore/install_2/share/ALPSCore on top of the CMake fixes in PR Modernize CMake configuration #19.

Note: a fresh warning build directly from current master with install_2 is blocked by the existing CMake/Boost imported-target issue addressed separately in PR #19.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to eliminate compiler warnings across the CT-HYB solver sources by removing unused locals, explicitly marking intentionally unused parameters, and updating loop counter types to better match container sizes. It also adjusts stream formatting handling around acceptance-statistics output.

Changes:

  • Replace several int loop counters with std::size_t when iterating over STL containers.
  • Remove unused local variables (e.g., in sector statistics and NFFT-related measurement code).
  • Add explicit “intentionally unused” markers for some interface parameters and restore stream formatting state in evaluation output.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
hybupdates.cpp Uses std::size_t for acceptance-statistics loops and restores std::cout formatting after printing stats.
hybmatrix.cpp Marks some unused parameters (void)parameter; in determinant-matrix update/remove paths.
hybmatrix_nfft.cpp Removes unused timing/flags variables in NFFT measurement code paths.
hyblocal.cpp Removes an unused local in sector statistics measurement.
hybevaluate.cpp Marks unused solver_output in select evaluation functions; improves acceptance-statistics loop types and restores output formatting.
hybconfig.cpp Uses std::size_t to iterate over hybmat_ for dumping weights.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hybupdates.cpp Outdated
Comment on lines +76 to +77
int tot_acc=0,cur_prec = std::cout.precision();
for (int i=0;i<nacc.size();i++) tot_acc += nacc[i];
for (std::size_t i=0;i<nacc.size();i++) tot_acc += nacc[i];
@egull
egull force-pushed the source-warning-cleanup branch from cc9f0ba to c0bee5f Compare June 3, 2026 11:24
@egull
egull requested a review from Copilot June 3, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@egull
egull merged commit 8fc45cf into master Jun 3, 2026
1 check passed
@egull
egull deleted the source-warning-cleanup branch June 3, 2026 11:36
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.

2 participants