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

PEC: Fix Uninit Var Warning (GCC) #5536

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Jan 3, 2025

GCC 13 throws a compile-time warning in 3D that in some cases, is_normal_to_boundary is used as uninitialized. There are a lot of ifs in its usage, so I simply changed the init value to false to silence it.

@ax3l ax3l added warning A compiler or tool warning component: boundary PML, embedded boundaries, et al. labels Jan 3, 2025
Copy link
Member

@dpgrote dpgrote left a comment

Choose a reason for hiding this comment

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

Thanks! I double checked the logic and that variable would have never been used if it was not set. But the fix is good.

@ax3l
Copy link
Member Author

ax3l commented Jan 3, 2025

Thanks! Yes, it looks a bit like a noisy compiler diagnostics to me, but the default feels sensible to add.

@ax3l ax3l enabled auto-merge (squash) January 3, 2025 21:46
@ax3l ax3l merged commit bbf9e0d into ECP-WarpX:development Jan 3, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: boundary PML, embedded boundaries, et al. warning A compiler or tool warning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants