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

Remove set but not used variable #4040

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

zdenop
Copy link
Contributor

@zdenop zdenop commented Mar 24, 2023

reported by clang.

And If I understand the code correctly: this old code (3.01) calculates gap, but never use it...

// Measure the mean space.
int gap_count = 0;
WERD *werd = word_res->word;
C_BLOB_IT blob_it(werd->cblob_list());
C_BLOB *prev_blob = blob_it.data();
for (blob_it.forward(); !blob_it.at_first(); blob_it.forward()) {
C_BLOB *blob = blob_it.data();
int gap = blob->bounding_box().left();
gap -= prev_blob->bounding_box().right();
++gap_count;
prev_blob = blob;
}

@stweil
Copy link
Contributor

stweil commented Mar 24, 2023

I wonder whether it would be better to use some variables in (configurable) debug output. Some of them can help to get a better understanding of the code. That's why I never removed them.

@zdenop
Copy link
Contributor Author

zdenop commented Mar 25, 2023

No problem for me - I just wanted:

  • to highlight these variables as they indicate not used/unfinished/not cleaned code
  • to have a clean build without warnings

@amitdo
Copy link
Collaborator

amitdo commented May 3, 2023

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.

None yet

3 participants