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

i.segment: Fix uninitialized variable issue #4023

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Conversation

ShubhamDesai
Copy link
Contributor

This pull request address all the uninitialized variables for c files in imagery folder.

Issues:

region_growing.c:725:17: Uninitialized struct member: ngbr_rc.next [uninitStructMember]
*pngbr_rc = ngbr_rc;

region_growing.c:1077:21: Uninitialized struct member: ngbr_rc.next [uninitStructMember]
*pngbr_rc = ngbr_rc;

region_growing.c:1555:21: Uninitialized struct member: ngbr_rc.next [uninitStructMember]
*pngbr_rc = ngbr_rc;

region_growing.c:1555:21: Uninitialized variable: ngbr_rc.next [uninitvar]
*pngbr_rc = ngbr_rc;

region_growing.c:899:10: Uninitialized variable: pl1 [uninitvar]
pl = pl1 + pl2 - nshared;

region_growing.c:899:16: Uninitialized variable: pl2 [uninitvar]
pl = pl1 + pl2 - nshared;

region_growing.c:916:13: Uninitialized variable: count1 [uninitvar]
count = count1 + count2;

region_growing.c:916:22: Uninitialized variable: count2 [uninitvar]
count = count1 + count2;

@github-actions github-actions bot added C Related code is in C module imagery labels Jul 10, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@echoix
Copy link
Member

echoix commented Jul 11, 2024

Just making sure, that was the remaining uninitialized variables issues for imagery modules? The other PR (#4022) was for all C++ uninitialized variable issues in imagery, and this one for C in imagery too, so there shouldn't be any left

@ShubhamDesai
Copy link
Contributor Author

Just making sure, that was the remaining uninitialized variables issues for imagery modules? The other PR (#4022) was for all C++ uninitialized variable issues in imagery, and this one for C in imagery too, so there shouldn't be any left

yes i checked nothing left

@echoix
Copy link
Member

echoix commented Jul 11, 2024

Do you know if there's a way to enable a check to enforce this on the folders that are fixed? So, once fixed, it would stay fixed? (It's out of scope for this PR, but would prevent wasting all this effort by regressing in the future).

@echoix echoix changed the title i.segment: Fix uninitialized variable issue in imagery folder for c files i.segment: Fix uninitialized variable issue Jul 11, 2024
@echoix
Copy link
Member

echoix commented Jul 11, 2024

I renamed the title to mention only that module, as it is the only one, but we had the context in the PR. It might just help avoid confusion in release notes later on.

@echoix echoix merged commit c9a1a17 into OSGeo:main Jul 11, 2024
27 checks passed
@neteler neteler added this to the 8.5.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C imagery module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants