-
Notifications
You must be signed in to change notification settings - Fork 24
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
Warnings in py_wind_macro #144
Comments
Try now @kslong - I added an error condition. |
I am still seeing these 2 warnings: py_wind_macro.c:477:7: warning: variable 'x' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] |
Apparently, James, you made some changes to fix this, but there were a couple of places where you used a python language construct instead of a c-language construct. I fixed these and it compiles now without errors on my machine. I've pushed this back to dev. Close if you agree. |
Woops...my automated build test caught this but it would appear having Knox on your team is just as effective! Closing. |
My compile of py_wind is generating these warnings
py_wind_macro.c:471:7: warning: variable 'x' is used uninitialized whenever 'if' condition is
false [-Wsometimes-uninitialized]
if (icell >= 0 && icell < NDIM2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
py_wind_macro.c:486:12: note: uninitialized use occurs here
wmain[x->nwind].xcen[0], wmain[x->nwind].xcen[1],
^
py_wind_macro.c:471:3: note: remove the 'if' if its condition is always true
if (icell >= 0 && icell < NDIM2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
py_wind_macro.c:471:7: warning: variable 'x' is used uninitialized whenever '&&' condition is
false [-Wsometimes-uninitialized]
if (icell >= 0 && icell < NDIM2)
^~~~~~~~~~
py_wind_macro.c:486:12: note: uninitialized use occurs here
wmain[x->nwind].xcen[0], wmain[x->nwind].xcen[1],
^
py_wind_macro.c:471:7: note: remove the '&&' if its condition is always true
if (icell >= 0 && icell < NDIM2)
^~~~~~~~~~~~~
py_wind_macro.c:461:14: note: initialize the variable 'x' to silence this warning
PlasmaPtr x, xdummy;
^
= NULL
2 warnings generated.
They are all about uninitialized variables which would be easy to fix, by initializing things, but it is less clear to me (ksl) that these are not if statements where the logic has not been worked out completely or to check for error conditions.
The text was updated successfully, but these errors were encountered: