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

fix a couple minor compiler warnings #2039

Merged

Conversation

chrismamo1
Copy link
Contributor

No description provided.

@egorpugin egorpugin merged commit f4a34e6 into tesseract-ocr:master Oct 31, 2018
@egorpugin
Copy link
Contributor

Thank you!

@@ -983,7 +983,7 @@ template <typename T>
bool GenericVector<T>::SkipDeSerialize(tesseract::TFile* fp) {
uint32_t reserved;
if (fp->FReadEndian(&reserved, sizeof(reserved), 1) != 1) return false;
return fp->FRead(nullptr, sizeof(T), reserved) == reserved;
return (uint32_t)fp->FRead(nullptr, sizeof(T), reserved) == reserved;
Copy link
Member

Choose a reason for hiding this comment

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

Please use C++ type casts instead of C type casts in future commits because C type casts also cause a compiler warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, sorry. I've been doing a lot of JS, Rust, and OCaml lately so I've got a few different ideas of what type casting looks like floating around in my head.

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.

3 participants