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

MNT: cleanup free of uninitialized variable #213

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

neutrinoceros
Copy link
Member

fix the following compilation warning

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -DOPENSSL_NO_SSL3 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/private/var/folders/xh/yfmp7l9n3x50ln2yvrndt7c801pbkm/T/build-env-sk2pigg1/include -I/Users/robcleme/.pyenv/versions/3.9.17/include/python3.9 -I/private/var/folders/xh/yfmp7l9n3x50ln2yvrndt7c801pbkm/T/build-env-sk2pigg1/lib/python3.9/site-packages/numpy/core/include -c yt_astro_analysis/halo_analysis/halo_finding/fof/EnzoFOF.c -o build/temp.macosx-13.4-x86_64-cpython-39/yt_astro_analysis/halo_analysis/halo_finding/fof/EnzoFOF.o
yt_astro_analysis/halo_analysis/halo_finding/fof/EnzoFOF.c:162:8: warning: variable 'kd' is uninitialized when used here [-Wuninitialized]
    if(kd->p!=NULL)free(kd->p);
       ^~
yt_astro_analysis/halo_analysis/halo_finding/fof/EnzoFOF.c:36:10: note: initialize the variable 'kd' to silence this warning
        KDFOF kd;
                ^
                 = NULL
1 warning generated.

As far as I can tell this is the last compilation warning that is actionable at the moment.

@neutrinoceros neutrinoceros merged commit 5e64d28 into yt-project:main Jul 29, 2023
@neutrinoceros neutrinoceros deleted the clean_free_uninit_var branch July 29, 2023 07:53
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.

1 participant