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

Fix Wstringop-overflow warning in FabConv #2767

Merged

Conversation

WeiqunZhang
Copy link
Member

On Perlmutter, g++ -O3 -march=znver3 produces lots of stringop-overflow warnings in
FabConv. These warnings are false positive because the compiler does not know
sizeof(amrex::Real) is either 4 or 8. This commit fixes the warnings.

Close #2750

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

On Perlmutter, `g++ -O3 -march=znver3` produces lots of stringop-overflow warnings in
FabConv.  These warnings are false positive because the compiler does not know
sizeof(amrex::Real) is either 4 or 8.  This commit fixes the warnings.

Close AMReX-Codes#2750
@WeiqunZhang WeiqunZhang requested review from atmyers and ax3l May 12, 2022 20:27
@WeiqunZhang WeiqunZhang merged commit 3be111e into AMReX-Codes:development May 12, 2022
@WeiqunZhang WeiqunZhang deleted the fix_warning_fabconv branch May 12, 2022 22:21
@ax3l
Copy link
Member

ax3l commented May 13, 2022

Thank you! 👍🙂

kngott pushed a commit to kngott/amrex that referenced this pull request May 19, 2022
On Perlmutter, `g++ -O3 -march=znver3` produces lots of stringop-overflow warnings in
FabConv.  These warnings are false positive because the compiler does not know
sizeof(amrex::Real) is either 4 or 8.  This commit fixes the warnings.

Close AMReX-Codes#2750
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.

AMReX_FabConv.cpp warning writing 1 byte into a region of size 0 [-Wstringop-overflow=]
3 participants