Skip to content

refactor: auto-generate are_adjacent(), avoid deprecated igraph_are_connected() C function#1254

Merged
aviator-app[bot] merged 4 commits intomainfrom
update-are-adjacent
Feb 20, 2024
Merged

refactor: auto-generate are_adjacent(), avoid deprecated igraph_are_connected() C function#1254
aviator-app[bot] merged 4 commits intomainfrom
update-are-adjacent

Conversation

@szhorvat
Copy link
Copy Markdown
Member

@szhorvat szhorvat commented Feb 17, 2024

Fixes #1253

@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app bot commented Feb 17, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@szhorvat szhorvat force-pushed the update-are-adjacent branch from a36caf1 to 4b5fd05 Compare February 17, 2024 21:07
@szhorvat szhorvat marked this pull request as ready for review February 17, 2024 21:08
@szhorvat szhorvat requested a review from krlmlr February 17, 2024 21:08
@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Feb 18, 2024

Thanks. Seeing -Waddress warnings in https://github.com/igraph/rigraph/actions/runs/7944281043/job/21689682420?pr=1254#step:9:84:

  vendor/cigraph/src/community/leading_eigenvector.c:606:28: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]
  vendor/cigraph/src/graph/visitors.c:261:21: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]
  vendor/cigraph/src/graph/visitors.c:551:67: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]
  vendor/cigraph/src/isomorphism/vf2.c:667:71: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]
  vendor/cigraph/src/isomorphism/vf2.c:1504:71: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]
  vendor/cigraph/src/misc/motifs.c:396:25: warning: the address of 'ret' will always evaluate as 'true' [-Waddress]

Could be a change in the build envionment, or related to this PR. New run for the main branch: https://github.com/igraph/rigraph/actions/runs/7946903820

@szhorvat
Copy link
Copy Markdown
Member Author

Forgot to re-add a manual patch after auto-generation.

@szhorvat szhorvat force-pushed the update-are-adjacent branch from 4b5fd05 to 2211c0f Compare February 18, 2024 10:08
@szhorvat
Copy link
Copy Markdown
Member Author

Fixed.

@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Feb 18, 2024

@szhorvat
Copy link
Copy Markdown
Member Author

CC @ntamas since he added this macro originally.

I vote for changing the macro in the C core in the same way as above, as this warning has been a constant annoyance when testing with various compilers, and so far there has been no need for performing this NULL-check. But it should be decided by Tamás.

@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Feb 18, 2024

I suspect it could be replaced with a static assert?

@ntamas
Copy link
Copy Markdown
Member

ntamas commented Feb 19, 2024

That macro was the usual defensive programming habit from my side. If we can replace the check with a static assert, that's great. If we can't, let's add a runtime assert instead if possible.

@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Feb 20, 2024

@ntamas: Please open an issue in igraph/C if needed.

@szhorvat: Thanks!

@aviator-app aviator-app bot force-pushed the update-are-adjacent branch from 2211c0f to 7de8fc5 Compare February 20, 2024 15:24
@aviator-app aviator-app bot merged commit dd60ff6 into main Feb 20, 2024
@aviator-app aviator-app bot deleted the update-are-adjacent branch February 20, 2024 15:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

igraph_are_adjacent()

3 participants