Skip to content
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

PMP: Initialize to avoid warning #8598

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

afabri
Copy link
Member

@afabri afabri commented Nov 8, 2024

Summary of Changes

An uninitialized variable gets assigned a value inside a for loop,
The compiler cannot know that we always enter the loop and warns when we later use the variable.
We could use [[assume(x)]] to indicate that we always will enter the loop but just initializing does the job.

Release Management

  • Affected package(s): PMP
  • License and copyright ownership: unchanged

@afabri afabri added Warnings For an issue about warnings, or a pull-request that fixes warnings Ready to be tested labels Nov 8, 2024
@afabri afabri added this to the 6.1-beta milestone Nov 8, 2024
@afabri
Copy link
Member Author

afabri commented Nov 13, 2024

Seems to be fixed as no longer here

@sloriot
Copy link
Member

sloriot commented Nov 14, 2024

Successfully tested in CGAL-6.1-Ic-18

@sloriot sloriot merged commit cf31301 into CGAL:master Nov 14, 2024
8 checks passed
@sloriot sloriot deleted the PMP-warning_workaround-GF branch November 14, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pkg::PMP Tested Warnings For an issue about warnings, or a pull-request that fixes warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants