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

-Wall Warnings #387

Open
jmstone opened this issue Nov 18, 2022 · 0 comments
Open

-Wall Warnings #387

jmstone opened this issue Nov 18, 2022 · 0 comments

Comments

@jmstone
Copy link
Collaborator

jmstone commented Nov 18, 2022

In GitLab by @pdmullen on Nov 18, 2022, 13:52

Compiling AthenaK issues many warnings when compiling with -Wall flag:

cmake3 -DAthena_ENABLE_MPI=On -Bbuild -D CMAKE_CXX_FLAGS="-Wall"

We should address these. Also, often -Wall flag is good at identifying uninitialized memory. In fact, there are few occurrences in the codebase now, e.g.,

/Users/pdmullen/Desktop/athenak/src/bvals/flux_correct_fc.cpp:68:18: warning: variable 'jl' is used uninitialized whenever 'if' condition is
      false [-Wsometimes-uninitialized]
      } else if (nghbr.d_view(m,n).lev == mblev.d_view(m)) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pdmullen/Desktop/athenak/src/bvals/flux_correct_fc.cpp:78:27: note: uninitialized use occurs here
      const int nj = ju - jl + 1;
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

No branches or pull requests

1 participant