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

T2: avoid maybe uninitialized warning #8751

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

afabri
Copy link
Member

@afabri afabri commented Feb 24, 2025

Summary of Changes

We know that the variable i will be set by is_edge(), we try to indicate it with a CGAL_assume() but that does not help the compiler, so let's just initialize it. We get the warning here.

I am wondering if the CGAL_assertion() I have put makes sense.

Release Management

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

@afabri afabri added this to the 6.1-beta milestone Feb 24, 2025
@afabri afabri requested a review from MaelRL February 24, 2025 07:35
@afabri afabri added Ready to be tested Pkg::Triangulation_2 Warnings For an issue about warnings, or a pull-request that fixes warnings labels Feb 24, 2025
@afabri
Copy link
Member Author

afabri commented Feb 25, 2025

As expected the warning is gone. @MaelRL do you agree that I can remove the assertion?

@sloriot
Copy link
Member

sloriot commented Mar 7, 2025

Successfully tested in CGAL-6.1-Ic-104 (warning is gone)

@sloriot sloriot merged commit 273ffde into CGAL:master Mar 7, 2025
8 checks passed
@sloriot sloriot deleted the T2-may_be_uninitialized-GF branch March 7, 2025 16:16
@MaelRL
Copy link
Member

MaelRL commented Mar 7, 2025

As expected the warning is gone. @MaelRL do you agree that I can remove the assertion?

If you go up in the history, there is a bit of back and forth (removed --> use assume --> removed...). Is it clear why the "assume" way failed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pkg::Triangulation_2 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.

3 participants