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

Fixes #4247: remove unnecessary nullptr checks #4248

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

hribz
Copy link
Contributor

@hribz hribz commented May 23, 2024

See #4247

Copy link
Contributor

@stweil stweil left a comment

Choose a reason for hiding this comment

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

Thank you. The changes are okay, but I noticed that you did not set your full name in Git (and / or on GitHub). Do you want to fix that before your pull request gets merged?

See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup if you need instructions how to do that.

@hribz
Copy link
Contributor Author

hribz commented May 23, 2024

Thank you. The changes are okay, but I noticed that you did not set your full name in Git (and / or on GitHub). Do you want to fix that before your pull request gets merged?

See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup if you need instructions how to do that.

Thanks a lot! I have set my full name on Github.

…inueContext

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil stweil requested a review from egorpugin May 23, 2024 13:54
@stweil
Copy link
Contributor

stweil commented May 23, 2024

Related report from Coverity Scan: CID 1438675 Dereference after null check.

}
prefix.Set(p, previous->code);
full_code.Set(p, previous->code);
previous = previous->prev;
Copy link
Contributor

Choose a reason for hiding this comment

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

I added this statement here because otherwise the for statement would have required a line break.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this statement here because otherwise the for statement would have required a line break.

I think placing previous = previous->prev here or within the for statement is equivalent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@stweil
Copy link
Contributor

stweil commented May 23, 2024

Related: Codacy issue #4248.

@stweil stweil merged commit 5712e16 into tesseract-ocr:main May 23, 2024
7 checks passed
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