Skip to content

fix compiler warnings from HiGHS 1.10.0 #2344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 18, 2025
Merged

fix compiler warnings from HiGHS 1.10.0 #2344

merged 2 commits into from
May 18, 2025

Conversation

svigerske
Copy link
Collaborator

This fixes again compiler warnings

  • on defining public functions without declaring them first, by either making them static or adding the declaration, and
  • on unused variables (i_clock is assigned by not used if NDEBUG is defined)

Copy link

codecov bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (5e7f6f3) to head (2200b6f).
Report is 18 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2344      +/-   ##
==========================================
- Coverage   79.26%   79.06%   -0.21%     
==========================================
  Files         345      345              
  Lines       84363    84387      +24     
==========================================
- Hits        66874    66720     -154     
- Misses      17489    17667     +178     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@galabovaa galabovaa self-requested a review May 18, 2025 10:30
@galabovaa
Copy link
Contributor

Hi Stefan,

Thank you for these! Just for reference, which compiler / OS combination do you use to check?

@svigerske
Copy link
Collaborator Author

We compile HiGHS with GCC 14 with -Wall -Wreturn-type -Wmissing-declarations -std=c++11 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment on Linux.

That we enable -Wmissing-declarations raised new warnings with every HiGHS update, which I then fix. But some of these -Wno-... are only added because it seemed a lot of work to fix all the warnings in the code.

This HighsTimer.h gets compiled in another code as well, one where we don't use -Wno-unused-variable.

@jajhall jajhall merged commit f5d43f1 into latest May 18, 2025
312 of 315 checks passed
@jajhall jajhall deleted the fix-warnings branch May 18, 2025 16:25
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.

3 participants