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: Move unused variable value into a code comment #4153

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

ShubhamDesai
Copy link
Contributor

This pull request addresses the issue identified by coverity scan (CID : 1415633).
The variable hspec is getting overwritten and only last assigned value is being updated.
To resolve this, the redundant assignments have been commented out rather than removing completely.

@github-actions github-actions bot added C Related code is in C module imagery labels Aug 7, 2024
@wenzeslaus
Copy link
Member

Looks like "previous ideas". The computation was added by @metzm in 6d56fca.

@nilason nilason added this to the 8.5.0 milestone Sep 11, 2024
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting this out creates ugly code, but I didn't dive into the code to be confident in just leaving this in the file history as opposed to having it in the code itself. There was no other feedback. Hence, I would just explicitly specify this in the code.

imagery/i.segment/mean_shift.c Outdated Show resolved Hide resolved
@wenzeslaus wenzeslaus changed the title i.segment: remove unused variable i.segment: Move unused variable value into a code comment Sep 16, 2024
@echoix echoix merged commit 826ab62 into OSGeo:main Sep 17, 2024
26 of 27 checks passed
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.

4 participants